Skip to content

Commit

Permalink
Fix usage infos and negate contains
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Sep 15, 2023
1 parent 54c7f61 commit fbec9d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ func getTestCases(selection TestSet) (tests []testRunWithSteps) {
// Run default tests if no test cases were selected
if len(selection) == 0 {
selection = TestSet{
"changeover", "happy-path",
"democracy-reward", "democracy", "slash-throttle",
"changeover/changeover", "happy-path/default",
"democracy-reward/democracy-reward", "democracy/democracy", "slash-throttle/slash-throttle",
}
if includeMultiConsumer != nil && *includeMultiConsumer {
selection = append(selection, "multiconsumer")
Expand All @@ -204,7 +204,7 @@ func getTestCases(selection TestSet) (tests []testRunWithSteps) {
stepsName := splitTcString[0]
testRunnerName := splitTcString[1]

if _, exists := stepChoices[tc]; !exists {
if _, exists := stepChoices[stepsName]; !exists {
log.Fatalf("Step choice '%s' not found.\nsee usage info:\n%s", tc, getTestCaseUsageString())
}

Expand All @@ -216,8 +216,8 @@ func getTestCases(selection TestSet) (tests []testRunWithSteps) {

testRunChoice := testRuns[testRunnerName]

if slices.Contains(stepChoice.testRuns, testRunChoice.name) {
log.Fatalf("Test runner '%s' is not compatible with step choice '%s'.\nsee usage info:\n%s", testRunnerName, stepsName, getTestCaseUsageString())
if !slices.Contains(stepChoice.testRuns, testRunChoice.name) {
log.Fatalf("Step choice '%s' is not compatible with test runner '%s'. compatible test runs: %s", stepsName, testRunnerName, strings.Join(stepChoice.testRuns, ","))
}

tests = append(tests, testRunWithSteps{
Expand Down

0 comments on commit fbec9d8

Please sign in to comment.