Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
chore: renable interface tests
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Sep 23, 2020
1 parent 607264a commit 368d7c3
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 9 deletions.
149 changes: 149 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,155 @@ jobs:
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-renderer -f ./test/browser.js -bail --timeout 10000

- stage: test
name: interface-core - node
addons:
chrome: stable
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node

- stage: test
name: interface-core - chrome
addons:
chrome: stable
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: interface-core - chrome webworker
addons:
chrome: stable
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker

- stage: test
name: interface-core - firefox
addons:
firefox: latest
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: interface-core - firefox webworker
addons:
firefox: latest
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless

- stage: test
name: interface-core - electron main
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main

- stage: test
name: interface-core - electron renderer
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-renderer

- stage: test
name: interface-http-go - node
addons:
chrome: stable
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node

- stage: test
name: interface-http-go - chrome
addons:
chrome: stable
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: interface-http-go - chrome webworker
addons:
chrome: stable
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker

- stage: test
name: interface-http-go - firefox
addons:
firefox: latest
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: interface-http-go - firefox webworker
addons:
firefox: latest
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless

- stage: test
name: interface-http-go - electron main
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t electron-main

- stage: test
name: interface-http-go - electron renderer
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t electron-renderer

- stage: test
name: interface-http-js - node
addons:
chrome: stable
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node

- stage: test
name: interface-http-js - chrome
addons:
chrome: stable
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: interface-http-js - chrome webworker
addons:
chrome: stable
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker

- stage: test
name: interface-http-js - firefox
addons:
firefox: latest
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: interface-http-js - firefox webworker
addons:
firefox: latest
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless

- stage: test
name: interface-http-js - electron main
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-main

- stage: test
name: interface-http-js - electron renderer
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-renderer

- stage: test
name: interface-message-port-client - chrome
addons:
chrome: stable
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: interface-message-port-client - firefox
addons:
firefox: latest
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: examples
script:
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"test:external": "lerna run test:external",
"test:cli": "lerna run test:cli",
"test:interop": "lerna run test:interop",
"test:interface:core": "lerna run test:interface:core",
"test:interface:http-go": "lerna run test:interface:http-go",
"test:interface:http-js": "lerna run test:interface:http-js",
"test:interface:message-port-client": "lerna run test:interface:message-port-client",
"coverage": "lerna run coverage",
"build": "lerna run build",
"clean": "lerna run clean",
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-message-port-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"scripts": {
"test": "echo 'Only interface tests live here'",
"test:interface:core:browser": "aegir test -t browser",
"test:interface:message-port-client": "aegir test -t browser -f ./test/interface-message-port-client.js",
"lint": "aegir lint",
"build:test-worker": "aegir build -- --config ./test/util/webpack.config.js",
"build": "aegir build",
Expand Down
3 changes: 2 additions & 1 deletion packages/ipfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"build": "aegir build",
"test": "echo 'Only interface tests live here'",
"test:interface:core": "aegir test -f test/interface-core.js",
"test:interface:http": "aegir test -f test/http-api/interface-http.js -- -t node",
"test:interface:http-js": "aegir test -f test/interface-http-js.js",
"test:interface:http-go": "aegir test -f test/interface-http-go.js",
"test:interop": "cross-env IPFS_JS_EXEC=$PWD/src/cli.js IPFS_JS_MODULE=$PWD IPFS_JS_HTTP_MODULE=$PWD/../ipfs-http-client IPFS_REUSEPORT=false ipfs-interop",
"test:external": "aegir test-dependant",
"coverage": "nyc --reporter=text --reporter=lcov npm run test:interface:core:node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ const isWindows = global.process && global.process.platform && global.process.pl

/** @typedef {import("ipfsd-ctl").ControllerOptions} ControllerOptions */

describe('interface-ipfs-core tests', () => {
const commonFactory = factory()
describe('interface-ipfs-core over ipfs-http-client tests against go-ipfs', () => {
const commonFactory = factory({
type: 'go'
})

tests.root(commonFactory, {
skip: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ const factory = require('./utils/factory')

/** @typedef { import("ipfsd-ctl").ControllerOptions } ControllerOptions */

describe('interface-ipfs-core over ipfs-http-client tests', function () {
describe('interface-ipfs-core over ipfs-http-client tests against js-ipfs', function () {
this.timeout(20000)

const commonFactory = factory({
type: 'js',
ipfsBin: require.resolve('ipfs-cli/src/bin.js'),
ipfsModule: false
type: 'js'
})

tests.root(commonFactory, {
Expand Down
5 changes: 4 additions & 1 deletion packages/ipfs/test/utils/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const commonOptions = {
test: true,
type: 'proc',
ipfsHttpModule: require('ipfs-http-client'),
ipfsModule: require('../../src'),
ipfsModule: require('ipfs-core'),
ipfsOptions: {
pass: 'ipfs-is-awesome-software',
libp2p: {
Expand Down Expand Up @@ -40,6 +40,9 @@ const commonOverrides = {
}
}
} : {})
},
go: {
ipfsBin: isNode ? require('go-ipfs').path() : undefined
}
}

Expand Down

0 comments on commit 368d7c3

Please sign in to comment.