@@ -53,6 +53,32 @@ describe('ipfs executable path', function () {
53
53
} )
54
54
} )
55
55
56
+ describe ( 'local daemon' , function ( ) {
57
+ const repoPath = '/tmp/ipfsd-ctl-test'
58
+ const addr = '/ip4/127.0.0.1/tcp/5678'
59
+ const config = {
60
+ Addresses : {
61
+ API : addr
62
+ }
63
+ }
64
+
65
+ it ( 'allows passing flags to init' , ( done ) => {
66
+ ipfsd . local ( repoPath , config , ( err , node ) => {
67
+ assert . equal ( err , null )
68
+
69
+ node . init ( ( err ) => {
70
+ assert . equal ( err , null )
71
+
72
+ node . getConfig ( 'Addresses.API' , ( err , res ) => {
73
+ assert . equal ( err , null )
74
+ assert . equal ( res , addr )
75
+ rimraf ( repoPath , done )
76
+ } )
77
+ } )
78
+ } )
79
+ } )
80
+ } )
81
+
56
82
describe ( 'disposable node with local api' , function ( ) {
57
83
this . timeout ( 20000 )
58
84
let ipfs
@@ -345,8 +371,9 @@ describe('ipfs-api version', function () {
345
371
} )
346
372
} )
347
373
374
+ // NOTE: if you change ./fixtures, the hash will need to be changed
348
375
it ( 'uses the correct ipfs-api' , ( done ) => {
349
- ipfs . util . addFromFs ( path . join ( __dirname , 'fixtures' ) , { recursive : true } , ( err , res ) => {
376
+ ipfs . util . addFromFs ( path . join ( __dirname , 'fixtures/ ' ) , { recursive : true } , ( err , res ) => {
350
377
if ( err ) throw err
351
378
352
379
const added = res [ res . length - 1 ]
0 commit comments