mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-01 05:27:18 +00:00
default test name to the filename of the integration test
# Conflicts: # tests/testIntegration.nim
This commit is contained in:
parent
2c31818f39
commit
95021aaa71
@ -30,9 +30,9 @@ type
|
||||
testTimeout: Duration # individual test timeout
|
||||
|
||||
IntegrationTestConfig* = object
|
||||
startHardhat*: bool
|
||||
testFile*: string
|
||||
name*: string
|
||||
startHardhat: bool
|
||||
testFile: string
|
||||
name: string
|
||||
|
||||
IntegrationTestStatus = enum ## The status of a test when it is done.
|
||||
Ok, # tests completed and all succeeded
|
||||
@ -87,6 +87,21 @@ proc new*(
|
||||
testTimeout: testTimeout
|
||||
)
|
||||
|
||||
func init*(
|
||||
_: type IntegrationTestConfig,
|
||||
testFile: string,
|
||||
startHardhat: bool,
|
||||
name = ""): IntegrationTestConfig =
|
||||
|
||||
IntegrationTestConfig(
|
||||
testFile: testFile,
|
||||
name: if name == "":
|
||||
testFile.extractFilename
|
||||
else:
|
||||
name,
|
||||
startHardhat: startHardhat
|
||||
)
|
||||
|
||||
template withLock*(lock: AsyncLock, body: untyped) =
|
||||
if lock.isNil:
|
||||
lock = newAsyncLock()
|
||||
|
@ -17,23 +17,23 @@ import ./integration/testmanager
|
||||
|
||||
const TestConfigs =
|
||||
@[
|
||||
# IntegrationTestConfig(testFile: "./integration/testcli", startHardhat: true),
|
||||
# IntegrationTestConfig(testFile: "./integration/testrestapi", startHardhat: true),
|
||||
# IntegrationTestConfig(testFile: "./integration/testupdownload", startHardhat: true),
|
||||
# IntegrationTestConfig(testFile: "./integration/testsales", startHardhat: true),
|
||||
# IntegrationTestConfig(testFile: "./integration/testpurchasing", startHardhat: true),
|
||||
# IntegrationTestConfig(testFile: "./integration/testblockexpiration", startHardhat: true),
|
||||
IntegrationTestConfig(
|
||||
name: "Basic Marketplace and payout tests",
|
||||
testFile: "./integration/testmarketplace",
|
||||
startHardhat: true,
|
||||
IntegrationTestConfig.init("./integration/testcli", startHardhat = true),
|
||||
IntegrationTestConfig.init("./integration/testrestapi", startHardhat = false),
|
||||
# IntegrationTestConfig.init("./integration/testupdownload", startHardhat = true),
|
||||
# IntegrationTestConfig.init("./integration/testsales", startHardhat = true),
|
||||
# IntegrationTestConfig.init("./integration/testpurchasing", startHardhat = true),
|
||||
# IntegrationTestConfig.init("./integration/testblockexpiration", startHardhat = true),
|
||||
# IntegrationTestConfig.init(
|
||||
# name = "Basic Marketplace and payout tests",
|
||||
# testFile = "./integration/testmarketplace",
|
||||
# startHardhat = true,
|
||||
),
|
||||
# IntegrationTestConfig(testFile: "./integration/testproofs", startHardhat: true),
|
||||
# IntegrationTestConfig(testFile: "./integration/testvalidator", startHardhat: true),
|
||||
IntegrationTestConfig(
|
||||
name: "Erasure Coding Bug",
|
||||
testFile: "./integration/testecbug",
|
||||
startHardhat: true,
|
||||
# IntegrationTestConfig("./integration/testproofs", startHardhat = true),
|
||||
# IntegrationTestConfig("./integration/testvalidator", startHardhat = true),
|
||||
IntegrationTestConfig.init(
|
||||
name = "Erasure Coding Bug",
|
||||
testFile = "./integration/testecbug",
|
||||
startHardhat = true,
|
||||
)
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user