Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

fix: use ephemeral ports in API/Gateway bind test #2305

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/cli/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ describe('daemon', () => {
this.timeout(20 * 1000)

const apiAddrs = [
'/ip4/127.0.0.1/tcp/55001',
'/ip4/127.0.0.1/tcp/55002'
'/ip4/127.0.0.1/tcp/0',
'/dns4/localhost/tcp/0'
]

const gatewayAddrs = [
'/ip4/127.0.0.1/tcp/64080',
'/ip4/127.0.0.1/tcp/64081'
'/ip4/127.0.0.1/tcp/0',
'/dns4/localhost/tcp/0'
]

await ipfs('init')
Expand All @@ -124,8 +124,8 @@ describe('daemon', () => {
})
})

apiAddrs.forEach(addr => expect(out).to.include(`API listening on ${addr}`))
gatewayAddrs.forEach(addr => expect(out).to.include(`Gateway (read only) listening on ${addr}`))
apiAddrs.forEach(addr => expect(out).to.include(`API listening on ${addr.slice(0, -2)}`))
gatewayAddrs.forEach(addr => expect(out).to.include(`Gateway (read only) listening on ${addr.slice(0, -2)}`))
})

it('should allow no bind addresses for API and Gateway', async function () {
Expand Down