Skip to content

Commit

Permalink
fixup! verify miner ids queried
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Mar 19, 2024
1 parent 7378e8d commit 0a48986
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ test('integration', async () => {
})

test('retrieval check for our CID', async () => {
const minersChecked = []
const getMinerPeerId = async (minerId) => {
assertEquals(minerId, OUR_FAKE_MINER_ID)
minersChecked.push(minerId)
return FRISBEE_PEER_ID
}
const spark = new Spark({ getMinerPeerId })
Expand All @@ -31,6 +32,8 @@ test('retrieval check for our CID', async () => {
const m = await res.json()
const assertProp = (prop, expectedValue) => assertEquals(m[prop], expectedValue, prop)

assertEquals(minersChecked, [OUR_FAKE_MINER_ID])

assertProp('cid', KNOWN_CID)
assertProp('minerId', OUR_FAKE_MINER_ID)
assertProp('providerId', FRISBEE_PEER_ID)
Expand Down

0 comments on commit 0a48986

Please sign in to comment.