Skip to content

Commit 127972b

Browse files
dryajovmarkspanbroek
authored andcommitted
wip
1 parent db3a1c4 commit 127972b

File tree

1 file changed

+64
-34
lines changed

1 file changed

+64
-34
lines changed

tests/integration/30_minutes/testmarketplace.nim

Lines changed: 64 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,22 @@ import ../nodeconfigs
1010

1111
marketplacesuite(name = "Marketplace", stopOnRequestFail = true):
1212
let marketplaceConfig = NodeConfigs(
13-
clients: CodexConfigs.init(nodes = 1).some,
14-
providers: CodexConfigs.init(nodes = 1).some,
13+
clients: CodexConfigs
14+
.init(nodes = 1)
15+
.debug()
16+
.withLogFile()
17+
.withLogTopics(
18+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
19+
"statemachine", "slotqueue", "reservations",
20+
).some,
21+
providers: CodexConfigs
22+
.init(nodes = 1)
23+
.debug()
24+
.withLogFile()
25+
.withLogTopics(
26+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
27+
"statemachine", "slotqueue", "reservations",
28+
).some,
1529
)
1630

1731
var host: CodexClient
@@ -135,14 +149,22 @@ marketplacesuite(name = "Marketplace", stopOnRequestFail = true):
135149

136150
test "SP are able to process slots after workers were busy with other slots and ignored them",
137151
NodeConfigs(
138-
clients: CodexConfigs.init(nodes = 1)
139-
# .debug()
140-
.some,
141-
providers: CodexConfigs.init(nodes = 2)
142-
# .debug()
143-
# .withLogFile()
144-
# .withLogTopics("marketplace", "sales", "statemachine","slotqueue", "reservations")
145-
.some,
152+
clients: CodexConfigs
153+
.init(nodes = 1)
154+
.debug()
155+
.withLogFile()
156+
.withLogTopics(
157+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
158+
"statemachine", "slotqueue", "reservations",
159+
).some,
160+
providers: CodexConfigs
161+
.init(nodes = 2)
162+
.debug()
163+
.withLogFile()
164+
.withLogTopics(
165+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
166+
"statemachine", "slotqueue", "reservations",
167+
).some,
146168
):
147169
let client0 = clients()[0]
148170
let provider0 = providers()[0]
@@ -219,20 +241,22 @@ marketplacesuite(name = "Marketplace payouts", stopOnRequestFail = true):
219241
NodeConfigs(
220242
# Uncomment to start Hardhat automatically, typically so logs can be inspected locally
221243
hardhat: HardhatConfig.none,
222-
clients: CodexConfigs.init(nodes = 1)
223-
# .debug() # uncomment to enable console log output.debug()
224-
# .withLogFile()
225-
# # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
226-
# .withLogTopics("node", "erasure")
227-
.some,
228-
providers: CodexConfigs.init(nodes = 1)
229-
# .debug() # uncomment to enable console log output
230-
# .withLogFile()
231-
# # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
232-
# .withLogTopics(
233-
# "node", "marketplace", "sales", "reservations", "node", "statemachine"
234-
# )
235-
.some,
244+
clients: CodexConfigs
245+
.init(nodes = 1)
246+
.debug()
247+
.withLogFile()
248+
.withLogTopics(
249+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
250+
"statemachine", "slotqueue", "reservations", "erasure",
251+
).some,
252+
providers: CodexConfigs
253+
.init(nodes = 1)
254+
.debug()
255+
.withLogFile()
256+
.withLogTopics(
257+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
258+
"statemachine", "slotqueue", "reservations", "erasure",
259+
).some,
236260
):
237261
let duration = 6.periods
238262
let expiry = 4.periods
@@ -317,16 +341,22 @@ marketplacesuite(name = "Marketplace payouts", stopOnRequestFail = true):
317341
test "the collateral is returned after a sale is ignored",
318342
NodeConfigs(
319343
hardhat: HardhatConfig.none,
320-
clients: CodexConfigs.init(nodes = 1).some,
321-
providers: CodexConfigs.init(nodes = 3)
322-
# .debug()
323-
# uncomment to enable console log output
324-
# .withLogFile()
325-
# uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
326-
# .withLogTopics(
327-
# "node", "marketplace", "sales", "reservations", "statemachine"
328-
# )
329-
.some,
344+
clients: CodexConfigs
345+
.init(nodes = 1)
346+
.debug()
347+
.withLogFile()
348+
.withLogTopics(
349+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
350+
"statemachine", "slotqueue", "reservations", "erasure",
351+
).some,
352+
providers: CodexConfigs
353+
.init(nodes = 3)
354+
.debug()
355+
.withLogFile()
356+
.withLogTopics(
357+
"codex", "codex slots builder", "codex slots sampler", "marketplace", "sales",
358+
"statemachine", "slotqueue", "reservations", "erasure",
359+
).some,
330360
):
331361
let data = await RandomChunker.example(blocks = blocks)
332362
let client0 = clients()[0]

0 commit comments

Comments
 (0)