Skip to content

Commit

Permalink
rand rpcport n port
Browse files Browse the repository at this point in the history
  • Loading branch information
canonbrother committed Jan 31, 2024
1 parent dc3722c commit c9ee988
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/whale-api/src/e2e.defid.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,17 @@ export class DefidBin {
tmpDir = ''
binary: ChildProcess | null = null

rpcUrl = 'http://test:[email protected]:19554'
port = this.randomPort()

rpcPort = this.randomPort()
rpcUrl = `http://test:[email protected]:${this.rpcPort}`
rpcClient = new DefidRpcClient(this.rpcUrl)
rpc = new DefidRpc(this, this.rpcClient)

oceanPort = this.randomPort()
// NOTE(canonbrother): url = `${urlString as string}/${version as string}/${network as string}/${path}`
oceanClient = new DefidOceanApiClient(`http://127.0.0.1:${this.oceanPort}`)
oceanUrl = `http://127.0.0.1:${this.oceanPort}`
oceanClient = new DefidOceanApiClient(this.oceanUrl)
ocean = new DefidOcean(this.oceanClient)

private randomPort (): number {
Expand Down Expand Up @@ -726,6 +730,8 @@ export class DefidBin {
'-acindex=1',
'-oceanarchive',
`-oceanarchiveport=${this.oceanPort}`,
`-rpcport=${this.rpcPort}`,
`-port=${this.port}`,
...opts
]

Expand Down

0 comments on commit c9ee988

Please sign in to comment.