add minimal changes to get integration tests running
This commit is contained in:
parent
591895f225
commit
4019f35c76
|
@ -25,5 +25,5 @@ template ethersuite*(name, body) =
|
|||
|
||||
body
|
||||
|
||||
export asynctest
|
||||
export unittest
|
||||
export ethers except `%`
|
||||
|
|
|
@ -28,7 +28,7 @@ proc setLogLevel*(client: CodexClient, level: string) =
|
|||
let url = client.baseurl & "/debug/chronicles/loglevel?level=" & level
|
||||
let headers = newHttpHeaders({"Content-Type": "text/plain"})
|
||||
let response = client.http.request(url, httpMethod=HttpPost, headers=headers)
|
||||
assert response.status == "200 OK"
|
||||
assert response.status == "200 OK", response.status
|
||||
|
||||
proc upload*(client: CodexClient, contents: string): ?!Cid =
|
||||
let response = client.http.post(client.baseurl & "/data", contents)
|
||||
|
|
|
@ -30,9 +30,11 @@ twonodessuite "Proving integration test", debug1=false, debug2=false:
|
|||
# As we use in tests ethProvider.currentTime() which uses block timestamp this can lead to synchronization issues.
|
||||
await ethProvider.advanceTime(1.u256)
|
||||
|
||||
proc waitUntilPurchaseIsStarted(proofProbability: uint64 = 3,
|
||||
duration: uint64 = 100 * period,
|
||||
expiry: uint64 = 30) {.async.} =
|
||||
proc waitUntilPurchaseIsStarted(
|
||||
proofProbability: uint64 = 3,
|
||||
duration: uint64 = 100 * period,
|
||||
expiry: uint64 = 30
|
||||
) {.async: (handleException: true, raises: [AsyncExceptionError]).} =
|
||||
discard client2.postAvailability(
|
||||
size=0xFFFFF.u256,
|
||||
duration=duration.u256,
|
||||
|
@ -141,9 +143,11 @@ multinodesuite "Simulate invalid proofs",
|
|||
let endOfPeriod = periodicity.periodEnd(currentPeriod)
|
||||
await ethProvider.advanceTimeTo(endOfPeriod + 1)
|
||||
|
||||
proc waitUntilPurchaseIsStarted(proofProbability: uint64 = 1,
|
||||
duration: uint64 = 12.periods,
|
||||
expiry: uint64 = 4.periods) {.async.} =
|
||||
proc waitUntilPurchaseIsStarted(
|
||||
proofProbability: uint64 = 1,
|
||||
duration: uint64 = 12.periods,
|
||||
expiry: uint64 = 4.periods
|
||||
) {.async: (handleException: true, raises: [AsyncExceptionError]).} =
|
||||
|
||||
if clients().len < 1 or providers().len < 1:
|
||||
raiseAssert("must start at least one client and one ethProvider")
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8e2f4e73b97123be0f0041c129942b32df23ecb1
|
||||
Subproject commit d60ffb9792234986e14f88dcc21a15437d0ea212
|
Loading…
Reference in New Issue