Skip to content

Commit

Permalink
adding the check in the testcase as well
Browse files Browse the repository at this point in the history
  • Loading branch information
fokion committed Jul 27, 2023
1 parent f8bba07 commit 1c9f7d6
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions process_testcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,23 @@ func (v *Venom) processSecrets(ctx context.Context, ts *TestSuite, tc *TestCase)
}

func (v *Venom) runTestSteps(ctx context.Context, tc *TestCase, tsIn *TestStepResult) {
results, err := testConditionalStatement(ctx, tc, tc.Skip, tc.Vars, "skipping testcase %q: %v")
if err != nil {
Error(ctx, "unable to evaluate \"skip\" assertions: %v", err)
testStepResult := TestStepResult{}
testStepResult.appendError(err)
tc.TestStepResults = append(tc.TestStepResults, testStepResult)
return
}
if len(results) > 0 {
tc.Status = StatusSkip
for _, s := range results {
tc.Skipped = append(tc.Skipped, Skipped{Value: s})
Warn(ctx, s)
if len(tc.Skip) > 0 {
results, err := testConditionalStatement(ctx, tc, tc.Skip, tc.Vars, "skipping testcase %q: %v")
if err != nil {
Error(ctx, "unable to evaluate \"skip\" assertions: %v", err)
testStepResult := TestStepResult{}
testStepResult.appendError(err)
tc.TestStepResults = append(tc.TestStepResults, testStepResult)
return
}
if len(results) == 0 {
tc.Status = StatusSkip
for _, s := range results {
tc.Skipped = append(tc.Skipped, Skipped{Value: s})
Warn(ctx, s)
}
return
}
return
}

var knowExecutors = map[string]struct{}{}
Expand Down

0 comments on commit 1c9f7d6

Please sign in to comment.