This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +19
-74
lines changed Expand file tree Collapse file tree 5 files changed +19
-74
lines changed Original file line number Diff line number Diff line change @@ -10,25 +10,14 @@ module.exports = (createCommon, options) => {
10
10
const common = createCommon ( )
11
11
12
12
describe ( '.config.get' , function ( ) {
13
- this . timeout ( 30 * 1000 )
13
+ this . timeout ( 60 * 1000 )
14
14
let ipfs
15
15
16
- before ( function ( done ) {
17
- // CI takes longer to instantiate the daemon, so we need to increase the
18
- // timeout for the before step
19
- this . timeout ( 60 * 1000 )
20
-
21
- common . setup ( ( err , factory ) => {
22
- expect ( err ) . to . not . exist ( )
23
- factory . spawnNode ( ( err , node ) => {
24
- expect ( err ) . to . not . exist ( )
25
- ipfs = node
26
- done ( )
27
- } )
28
- } )
16
+ before ( async ( ) => {
17
+ ipfs = await common . setup ( )
29
18
} )
30
19
31
- after ( ( done ) => common . teardown ( done ) )
20
+ after ( ( ) => common . teardown ( ) )
32
21
33
22
it ( 'should retrieve the whole config' , async ( ) => {
34
23
const config = await ipfs . config . get ( )
Original file line number Diff line number Diff line change @@ -12,22 +12,11 @@ module.exports = (createCommon, options) => {
12
12
this . timeout ( 30 * 1000 )
13
13
let ipfs
14
14
15
- before ( function ( done ) {
16
- // CI takes longer to instantiate the daemon, so we need to increase the
17
- // timeout for the before step
18
- this . timeout ( 60 * 1000 )
19
-
20
- common . setup ( ( err , factory ) => {
21
- expect ( err ) . to . not . exist ( )
22
- factory . spawnNode ( ( err , node ) => {
23
- expect ( err ) . to . not . exist ( )
24
- ipfs = node
25
- done ( )
26
- } )
27
- } )
15
+ before ( async ( ) => {
16
+ ipfs = await common . setup ( )
28
17
} )
29
18
30
- after ( ( done ) => common . teardown ( done ) )
19
+ after ( ( ) => common . teardown ( ) )
31
20
32
21
it ( 'should apply a config profile' , async ( ) => {
33
22
const diff = await ipfs . config . profiles . apply ( 'lowpower' )
Original file line number Diff line number Diff line change @@ -9,25 +9,14 @@ module.exports = (createCommon, options) => {
9
9
const common = createCommon ( )
10
10
11
11
describe ( '.config.profiles.list' , function ( ) {
12
- this . timeout ( 30 * 1000 )
12
+ this . timeout ( 60 * 1000 )
13
13
let ipfs
14
14
15
- before ( function ( done ) {
16
- // CI takes longer to instantiate the daemon, so we need to increase the
17
- // timeout for the before step
18
- this . timeout ( 60 * 1000 )
19
-
20
- common . setup ( ( err , factory ) => {
21
- expect ( err ) . to . not . exist ( )
22
- factory . spawnNode ( ( err , node ) => {
23
- expect ( err ) . to . not . exist ( )
24
- ipfs = node
25
- done ( )
26
- } )
27
- } )
15
+ before ( async ( ) => {
16
+ ipfs = await common . setup ( )
28
17
} )
29
18
30
- after ( ( done ) => common . teardown ( done ) )
19
+ after ( ( ) => common . teardown ( ) )
31
20
32
21
it ( 'should list config profiles' , async ( ) => {
33
22
const profiles = await ipfs . config . profiles . list ( )
Original file line number Diff line number Diff line change @@ -9,25 +9,14 @@ module.exports = (createCommon, options) => {
9
9
const common = createCommon ( )
10
10
11
11
describe ( '.config.replace' , function ( ) {
12
- this . timeout ( 30 * 1000 )
12
+ this . timeout ( 60 * 1000 )
13
13
let ipfs
14
14
15
- before ( function ( done ) {
16
- // CI takes longer to instantiate the daemon, so we need to increase the
17
- // timeout for the before step
18
- this . timeout ( 60 * 1000 )
19
-
20
- common . setup ( ( err , factory ) => {
21
- expect ( err ) . to . not . exist ( )
22
- factory . spawnNode ( ( err , node ) => {
23
- expect ( err ) . to . not . exist ( )
24
- ipfs = node
25
- done ( )
26
- } )
27
- } )
15
+ before ( async ( ) => {
16
+ ipfs = await common . setup ( )
28
17
} )
29
18
30
- after ( ( done ) => common . teardown ( done ) )
19
+ after ( ( ) => common . teardown ( ) )
31
20
32
21
const config = {
33
22
Fruit : 'Bananas'
Original file line number Diff line number Diff line change @@ -9,25 +9,14 @@ module.exports = (createCommon, options) => {
9
9
const common = createCommon ( )
10
10
11
11
describe ( '.config.set' , function ( ) {
12
- this . timeout ( 30 * 1000 )
12
+ this . timeout ( 60 * 1000 )
13
13
let ipfs
14
14
15
- before ( function ( done ) {
16
- // CI takes longer to instantiate the daemon, so we need to increase the
17
- // timeout for the before step
18
- this . timeout ( 60 * 1000 )
19
-
20
- common . setup ( ( err , factory ) => {
21
- expect ( err ) . to . not . exist ( )
22
- factory . spawnNode ( ( err , node ) => {
23
- expect ( err ) . to . not . exist ( )
24
- ipfs = node
25
- done ( )
26
- } )
27
- } )
15
+ before ( async ( ) => {
16
+ ipfs = await common . setup ( )
28
17
} )
29
18
30
- after ( ( done ) => common . teardown ( done ) )
19
+ after ( ( ) => common . teardown ( ) )
31
20
32
21
it ( 'should set a new key' , async ( ) => {
33
22
await ipfs . config . set ( 'Fruit' , 'banana' )
You can’t perform that action at this time.
0 commit comments