[purchasing] Fix integration test

This commit is contained in:
Mark Spanbroek 2022-07-06 15:38:02 +02:00 committed by markspanbroek
parent 4a4588e2a0
commit bd2fba50c7
2 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,7 @@ type
offerExpiryMargin: UInt256
request*: StorageRequest
offers*: seq[StorageOffer]
selected*: ?StorageOffer
selected*: ?Address
PurchaseTimeout* = Timeout
const DefaultProofProbability = 100.u256
@ -85,6 +85,7 @@ proc run(purchase: Purchase) {.async.} =
let subscription = await market.subscribeFulfillment(request.id, callback)
try:
await done
purchase.selected = await market.getHost(request.id)
finally:
await subscription.unsubscribe()

View File

@ -107,5 +107,5 @@ ethersuite "Integration tests":
let purchase = waitFor upload().buy().finish()
check purchase["error"].getStr == ""
check purchase["selected"].len > 0
check purchase["selected"].getStr == $accounts[1]
check available().len == 0