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

Commit bad8232

Browse files
committed
only missing circuit relay interop tests
1 parent 36afc59 commit bad8232

File tree

5 files changed

+28
-22
lines changed

5 files changed

+28
-22
lines changed

.aegir.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const parallel = require('async/parallel')
44
const ads = require('./test/utils/another-daemon-spawner')
55
const js = ads.spawnJsNode
6-
// const go = ads.spawnGoNode
6+
const go = ads.spawnGoNode
77
const stop = ads.stopNodes
88

99
/*
@@ -12,18 +12,23 @@ const stop = ads.stopNodes
1212
function start (done) {
1313
const base = '/ip4/127.0.0.1/tcp'
1414

15-
parallel([
16-
(cb) => js([`${base}/10007`, `${base}/20007/ws`], true, 31007, 32007, cb),
17-
(cb) => js([`${base}/10008`, `${base}/20008/ws`], true, 31008, 32008, cb),
18-
(cb) => js([`${base}/10012`, `${base}/20012/ws`], true, 31012, 32012, cb),
19-
(cb) => js([`${base}/10013`, `${base}/20013/ws`], true, 31013, 32013, cb),
20-
(cb) => js([`${base}/10014`, `${base}/20014/ws`], true, 31014, 32014, cb),
21-
(cb) => js([`${base}/10015`, `${base}/20015/ws`], true, 31015, 32015, cb)
22-
// (cb) => go([`${base}/10027`, `${base}/20027/ws`], true, 33027, 44027, cb),
23-
// (cb) => go([`${base}/10028`, `${base}/20028/ws`], true, 33028, 44028, cb),
24-
// (cb) => go([`${base}/10031`, `${base}/20031/ws`], true, 33031, 44031, cb),
25-
// (cb) => go([`${base}/10032`, `${base}/20032/ws`], true, 33032, 44032, cb)
26-
], done)
15+
if (!process.env.IPFS_TEST) {
16+
parallel([
17+
(cb) => js([`${base}/10007`, `${base}/20007/ws`], true, 31007, 32007, cb),
18+
(cb) => js([`${base}/10008`, `${base}/20008/ws`], true, 31008, 32008, cb),
19+
(cb) => js([`${base}/10012`, `${base}/20012/ws`], true, 31012, 32012, cb),
20+
(cb) => js([`${base}/10013`, `${base}/20013/ws`], true, 31013, 32013, cb),
21+
(cb) => js([`${base}/10014`, `${base}/20014/ws`], true, 31014, 32014, cb),
22+
(cb) => js([`${base}/10015`, `${base}/20015/ws`], true, 31015, 32015, cb)
23+
], done)
24+
} else {
25+
parallel([
26+
(cb) => go([`${base}/10027`, `${base}/20027/ws`], true, 33027, 44027, cb),
27+
(cb) => go([`${base}/10028`, `${base}/20028/ws`], true, 33028, 44028, cb),
28+
(cb) => go([`${base}/10031`, `${base}/20031/ws`], true, 33031, 44031, cb),
29+
(cb) => go([`${base}/10032`, `${base}/20032/ws`], true, 33032, 44032, cb)
30+
], done)
31+
}
2732
}
2833

2934
module.exports = {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"test:unit:node:gateway": "aegir test -t node -f test/gateway/index.js",
3434
"test:unit:node:cli": "aegir test -t node -f test/cli/index.js",
3535
"test:unit:browser": "aegir test -t browser --no-cors",
36-
"test:interop": "aegir test -t node -t browser -f test/interop",
37-
"test:interop:node": "aegir test -t node -f test/interop/node.js",
38-
"test:interop:browser": "aegir test -t browser -f test/interop/browser.js",
36+
"test:interop": "IPFS_TEST=interop aegir test -t node -t browser -f test/interop",
37+
"test:interop:node": "IPFS_TEST=interop aegir test -t node -f test/interop/node.js",
38+
"test:interop:browser": "IPFS_TEST=interop aegir test -t browser -f test/interop/browser.js",
3939
"test:benchmark": "echo \"Error: no benchmarks yet\" && exit 1",
4040
"test:benchmark:node": "echo \"Error: no benchmarks yet\" && exit 1",
4141
"test:benchmark:node:core": "echo \"Error: no benchmarks yet\" && exit 1",

test/interop/circuit.js renamed to test/interop/circuit-relay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const js = ads.spawnJsNode
1818
const go = ads.spawnGoNode
1919
const stop = ads.stopNodes
2020

21-
describe.skip('circuit interop', function () {
21+
describe.only('circuit interop', () => {
2222
let jsTCP
2323
let jsTCPAddrs
2424
let jsWS

test/interop/node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env mocha */
22
'use strict'
33

4+
require('./repo')
45
require('./exchange-files')
5-
require('./circuit')
6+
require('./circuit-relay')
67
require('./kad-dht')
7-
require('./repo')

test/interop/repo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ function catAndCheck (daemon, hash, data, callback) {
1818
(cb) => daemon.api.cat(hash, cb),
1919
(stream, cb) => stream.pipe(bl(cb))
2020
], (err, file) => {
21-
console.log('got file')
2221
expect(err).to.not.exist()
2322
expect(file).to.eql(data)
2423
callback()
2524
})
2625
}
2726

28-
describe.only('repo', () => {
27+
describe('repo', () => {
2928
it('read repo: go -> js', (done) => {
3029
const dir = os.tmpdir() + '/' + Math.ceil(Math.random() * 10000)
3130
const data = crypto.randomBytes(1024 * 5)
@@ -59,7 +58,9 @@ describe.only('repo', () => {
5958
], done)
6059
})
6160

62-
it('read repo: js -> go', (done) => {
61+
// This was last due to an update on go-ipfs that changed how datastore is
62+
// configured
63+
it.skip('read repo: js -> go', (done) => {
6364
const dir = os.tmpdir() + '/' + Math.ceil(Math.random() * 10000)
6465
const data = crypto.randomBytes(1024 * 5)
6566

0 commit comments

Comments
 (0)