From bb010791e37d571dff6930cf87b7dd2253e844da Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Thu, 23 Nov 2023 19:47:51 +1100 Subject: [PATCH] debugging in ci add .debug() to all validators --- tests/integration/testproofs.nim | 64 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/tests/integration/testproofs.nim b/tests/integration/testproofs.nim index 5cf0a847..0d0c4ce2 100644 --- a/tests/integration/testproofs.nim +++ b/tests/integration/testproofs.nim @@ -13,47 +13,47 @@ logScope: topics = "integration test proofs" -# marketplacesuite "Hosts submit regular proofs": +marketplacesuite "Hosts submit regular proofs": -# test "hosts submit periodic proofs for slots they fill", NodeConfigs( -# # Uncomment to start Hardhat automatically, mainly so logs can be inspected locally -# # hardhat: HardhatConfig().withLogFile() + test "hosts submit periodic proofs for slots they fill", NodeConfigs( + # Uncomment to start Hardhat automatically, mainly so logs can be inspected locally + # hardhat: HardhatConfig().withLogFile() -# clients: -# NodeConfig() -# .nodes(1) -# .debug() # uncomment to enable console log output -# .withLogFile() # uncomment to output log file to tests/integration/logs/ //_.log -# .withLogTopics("node"), + clients: + NodeConfig() + .nodes(1) + .debug() # uncomment to enable console log output + .withLogFile() # uncomment to output log file to tests/integration/logs/ //_.log + .withLogTopics("node"), -# providers: -# NodeConfig() -# .nodes(1) -# .debug() # uncomment to enable console log output -# .withLogFile() # uncomment to output log file to tests/integration/logs/ //_.log -# .withLogTopics("marketplace", "sales", "reservations", "node"), -# ): -# let client0 = clients()[0].node.client -# let totalPeriods = 50 + providers: + NodeConfig() + .nodes(1) + .debug() # uncomment to enable console log output + .withLogFile() # uncomment to output log file to tests/integration/logs/ //_.log + .withLogTopics("marketplace", "sales", "reservations", "node"), + ): + let client0 = clients()[0].node.client + let totalPeriods = 50 -# let data = byteutils.toHex(await exampleData()) -# createAvailabilities(data.len, totalPeriods.periods) + let data = byteutils.toHex(await exampleData()) + createAvailabilities(data.len, totalPeriods.periods) -# let cid = client0.upload(data).get + let cid = client0.upload(data).get -# let purchaseId = await client0.requestStorage(cid, duration=totalPeriods.periods) -# check eventually client0.purchaseStateIs(purchaseId, "started") + let purchaseId = await client0.requestStorage(cid, duration=totalPeriods.periods) + check eventually client0.purchaseStateIs(purchaseId, "started") -# var proofWasSubmitted = false -# proc onProofSubmitted(event: ProofSubmitted) = -# proofWasSubmitted = true + var proofWasSubmitted = false + proc onProofSubmitted(event: ProofSubmitted) = + proofWasSubmitted = true -# let subscription = await marketplace.subscribe(ProofSubmitted, onProofSubmitted) + let subscription = await marketplace.subscribe(ProofSubmitted, onProofSubmitted) -# let currentPeriod = await getCurrentPeriod() -# check eventuallyP(proofWasSubmitted, currentPeriod + totalPeriods.u256 + 1) + let currentPeriod = await getCurrentPeriod() + check eventuallyP(proofWasSubmitted, currentPeriod + totalPeriods.u256 + 1) -# await subscription.unsubscribe() + await subscription.unsubscribe() @@ -138,6 +138,7 @@ marketplacesuite "Simulate invalid proofs": validators: NodeConfig() .nodes(1) + .debug() .withLogFile() # uncomment to output log file to tests/integration/logs/ //_.log .withLogTopics("validator", "onchain", "ethers") ): @@ -190,6 +191,7 @@ marketplacesuite "Simulate invalid proofs": validators: NodeConfig() .nodes(1) + .debug() .withLogFile() # uncomment to output log file to tests/integration/logs/ //_.log .withLogTopics("validator") ):