Skip to content

Commit

Permalink
fix: more windows interop (#147)
Browse files Browse the repository at this point in the history
* test: run all tests on node

* chore: run on appveyor

* chore: get circleci working

* chore: browser tests are timing out on circle CI

* chore: travis is now timing out

* test: run without global timeout
  • Loading branch information
richardschneider authored and daviddias committed Nov 6, 2017
1 parent 3a44e56 commit 22590cb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 23 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ dependencies:
pre:
- google-chrome --version
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- for v in $(curl http://archive.ubuntu.com/ubuntu/pool/main/n/nss/ | grep "href=" | grep "libnss3.*deb\"" -o | grep -o "libnss3.*deb" | grep "3.28" | grep "14.04"); do curl -L -o $v http://archive.ubuntu.com/ubuntu/pool/main/n/nss/$v; done && rm libnss3-tools*_i386.deb libnss3-dev*_i386.deb
- sudo dpkg -i google-chrome.deb || true
- sudo dpkg -i libnss3*.deb || true
- sudo apt-get update
- sudo apt-get install -f || true
- sudo dpkg -i libnss3*.deb
- sudo apt-get install -f
- sudo apt-get install --only-upgrade lsb-base
- sudo dpkg -i google-chrome.deb
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"lodash": "^4.17.4",
"memdown": "^1.4.1",
"multihashes": "~0.4.12",
"multihashing-async": "^0.4.7",
"ncp": "^2.0.0",
"pre-commit": "^1.2.2",
"rimraf": "^2.6.2"
Expand Down
2 changes: 1 addition & 1 deletion test/datastore-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = (repo) => {
cb()
})
}), done)
})
}).timeout(10 * 1000)
})

describe('.has', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/interop-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Key = require('interface-datastore').Key
const map = require('async/map')

module.exports = (repo) => {
describe.only('interop', () => {
describe('interop', () => {
it('reads welcome-to-ipfs', (done) => {
const welcomeHash = mh.fromHexString(
'1220120f6af601d46e10b2d2e11ed71c55d25f3042c22501e41d1246e7a1e9d3d8ec'
Expand Down
27 changes: 6 additions & 21 deletions test/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ const ncp = require('ncp').ncp
const rimraf = require('rimraf')
const path = require('path')
const series = require('async/series')
const os = require('os')
const chai = require('chai')
chai.use(require('dirty-chai'))
const expect = chai.expect

const IPFSRepo = require('../src')

describe('IPFS Repo Tests on on Node.js', () => {
require('./options-test')

const repos = [{
name: 'default',
name: 'default inited',
opts: undefined,
init: false
init: true
}, {
name: 'memory',
opts: {
Expand All @@ -27,6 +25,10 @@ describe('IPFS Repo Tests on on Node.js', () => {
lock: 'memory'
},
init: true
}, {
name: 'default existing',
opts: undefined,
init: false
}]
repos.forEach((r) => describe(r.name, () => {
const testRepoPath = path.join(__dirname, 'test-repo')
Expand Down Expand Up @@ -55,23 +57,6 @@ describe('IPFS Repo Tests on on Node.js', () => {
], done)
})

it('init', (done) => {
const dir = path.join(os.tmpdir(), String(Math.random()).slice(2))
const r = new IPFSRepo(dir)

series([
(cb) => r.init({hello: 'world'}, cb),
(cb) => r.open(cb),
(cb) => r.config.get((err, val) => {
expect(err).to.not.exist()
expect(val).to.be.eql({hello: 'world'})
cb()
}),
(cb) => r.close(cb),
(cb) => rimraf(dir, cb)
], done)
})

require('./repo-test')(repo)
require('./blockstore-test')(repo)
require('./datastore-test')(repo)
Expand Down

0 comments on commit 22590cb

Please sign in to comment.