@@ -3,10 +3,9 @@ import { configureCreateVerifiableClaim, getVerifiableClaimSigner, isSignedVerif
33import { allPass , is , isNil , lensPath , not , path , pipe , pipeP , view } from 'ramda'
44import { describe } from 'riteway'
55
6- import { app } from '../../src/app'
76import { issuer , privateKey } from '../helpers/Keys'
87import { ensureBitcoinBalance , bitcoindClients , resetBitcoinServers } from '../helpers/bitcoin'
9- import { delayInSeconds , runtimeId , createDatabase } from '../helpers/utils'
8+ import { delayInSeconds , runtimeId , setUpServerAndDb } from '../helpers/utils'
109import { getWork , postWork } from '../helpers/works'
1110
1211const PREFIX = `test-functional-nodeA-poet-${ runtimeId ( ) } `
@@ -53,16 +52,7 @@ describe('Transaction timout will reset the transaction id for the claim', async
5352
5453 await delayInSeconds ( 5 )
5554
56- const db = await createDatabase ( PREFIX )
57- const server = await app ( {
58- BITCOIN_URL : btcdClientA . host ,
59- API_PORT : NODE_PORT ,
60- MONGODB_DATABASE : db . settings . tempDbName ,
61- MONGODB_USER : db . settings . tempDbUser ,
62- MONGODB_PASSWORD : db . settings . tempDbPassword ,
63- EXCHANGE_PREFIX : PREFIX ,
64- ...blockchainSettings ,
65- } )
55+ const { db, server } = await setUpServerAndDb ( { PREFIX , NODE_PORT , blockchainSettings } )
6656
6757 // Make sure node A has regtest coins to pay for transactions.
6858 await ensureBitcoinBalance ( btcdClientA )
0 commit comments