Skip to content

Commit

Permalink
Restore append before checking error (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm authored Apr 18, 2024
1 parent 6eda8fe commit b2c2c7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/testrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,15 @@ func testTypeCommandActionFactory(runner testrunner.TestRunner) cobraext.Command
RunTestsOnly: runTestsOnly,
RunIndependentElasticAgent: runIndependentElasticAgent,
})

// Results must be appended even if there is an error, since there could be
// tests (e.g. system tests) that return both error and results.
results = append(results, r...)

if err != nil {
return fmt.Errorf("error running package %s tests: %w", testType, err)
}

results = append(results, r...)
}

format := testrunner.TestReportFormat(reportFormat)
Expand Down

0 comments on commit b2c2c7a

Please sign in to comment.