This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 36
36
"test:interop" : " IPFS_TEST=interop aegir test -t node -t browser -f test/interop" ,
37
37
"test:interop:node" : " IPFS_TEST=interop aegir test -t node -f test/interop/node.js" ,
38
38
"test:interop:browser" : " IPFS_TEST=interop aegir test -t browser -f test/interop/browser.js" ,
39
+ "test:bootstrapers" : " aegir test -t browser -f test/bootstrapers.js" ,
39
40
"test:benchmark" : " echo \" Error: no benchmarks yet\" && exit 1" ,
40
41
"test:benchmark:node" : " echo \" Error: no benchmarks yet\" && exit 1" ,
41
42
"test:benchmark:node:core" : " echo \" Error: no benchmarks yet\" && exit 1" ,
Original file line number Diff line number Diff line change
1
+ /* eslint-env mocha */
2
+ 'use strict'
3
+
4
+ const chai = require ( 'chai' )
5
+ const dirtyChai = require ( 'dirty-chai' )
6
+ const expect = chai . expect
7
+ chai . use ( dirtyChai )
8
+ const IPFS = require ( '../..' )
9
+
10
+ /*
11
+ * These tests were graciously made for lgierth, so that he can test
12
+ * the WebSockets Bootstrappers easily :)
13
+ */
14
+ console . log ( '=>' , process . env . TEST_BOOTSTRAPERS )
15
+ if ( process . env . TEST_BOOTSTRAPERS ) {
16
+ describe . only ( 'Check if a connection can be done to the Bootstrapers' , ( ) => {
17
+ it ( 'a node connects to bootstrapers' , ( done ) => {
18
+ const node = new IPFS ( )
19
+ node . on ( 'ready' , ( ) => {
20
+ setTimeout ( ( ) => {
21
+ node . swarm . peers ( ( err , peers ) => {
22
+ expect ( err ) . to . not . exist ( )
23
+ expect ( peers . length ) . to . be . above ( 7 )
24
+ node . stop ( done )
25
+ } )
26
+ } , 1000 )
27
+ } )
28
+ } )
29
+
30
+ it . skip ( 'bootstrapers connections hold for more than 10 secs' , ( done ) => { } )
31
+ it . skip ( 'fetch a file added in this node, from bootstrapers' , ( done ) => { } )
32
+ } )
33
+ }
You can’t perform that action at this time.
0 commit comments