This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,17 @@ module.exports = function bootstrap (self) {
45
45
throw invalidMultiaddrError ( multiaddr )
46
46
}
47
47
48
+ let res = [ ]
48
49
const config = await self . _repo . config . get ( )
49
50
if ( args . all ) {
51
+ res = config . Bootstrap
50
52
config . Bootstrap = [ ]
51
53
} else {
52
54
config . Bootstrap = config . Bootstrap . filter ( ( mh ) => mh !== multiaddr )
53
55
}
54
56
55
57
await self . _repo . config . set ( config )
56
58
57
- const res = [ ]
58
59
if ( ! args . all && multiaddr ) {
59
60
res . push ( multiaddr )
60
61
}
Original file line number Diff line number Diff line change @@ -94,10 +94,12 @@ describe('bootstrap', () => runOnAndOff((thing) => {
94
94
it ( 'rm all bootstrap nodes' , async function ( ) {
95
95
this . timeout ( 40 * 1000 )
96
96
97
- const out = await ipfs ( 'bootstrap rm --all' )
98
- expect ( out ) . to . equal ( '' )
97
+ const outListBefore = await ipfs ( 'bootstrap list' )
99
98
100
- const out2 = await ipfs ( 'bootstrap list' )
101
- expect ( out2 ) . to . equal ( '' )
99
+ const outRm = await ipfs ( 'bootstrap rm --all' )
100
+ expect ( outRm ) . to . equal ( outListBefore )
101
+
102
+ const outListAfter = await ipfs ( 'bootstrap list' )
103
+ expect ( outListAfter ) . to . equal ( '' )
102
104
} )
103
105
} ) )
You can’t perform that action at this time.
0 commit comments