fix: tests with validation errors were skipped (#2496)
* fix: tests with validation errors were skipped * fixup * [no ci] fix one test * fix some tests * fix last test --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -196,11 +196,9 @@ func (j *TestJobFileInfo) runTest(ctx context.Context, t *testing.T, cfg *Config
|
||||
assert.Nil(t, err, j.workflowPath)
|
||||
|
||||
planner, err := model.NewWorkflowPlanner(fullWorkflowPath, true)
|
||||
if err != nil {
|
||||
if j.errorMessage != "" && err != nil {
|
||||
assert.Error(t, err, j.errorMessage)
|
||||
} else {
|
||||
assert.Nil(t, err, fullWorkflowPath)
|
||||
|
||||
} else if assert.Nil(t, err, fullWorkflowPath) {
|
||||
plan, err := planner.PlanEvent(j.eventName)
|
||||
assert.True(t, (err == nil) != (plan == nil), "PlanEvent should return either a plan or an error")
|
||||
if err == nil && plan != nil {
|
||||
|
||||
Reference in New Issue
Block a user