Skip to content

Commit

Permalink
fix: exit code when failing in root test run (#2002)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly authored Sep 19, 2024
1 parent ac25391 commit a9d1db9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/runner/processors/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (p *testsProcessor) Run(ctx context.Context, tc engine.Context, tests ...di
tc, namespace, err := setupContextData(ctx, tc, contextData)
if err != nil {
logging.Log(ctx, logging.Internal, logging.ErrorStatus, color.BoldRed, logging.ErrSection(err))
tc.IncFailed()
failer.FailNow(ctx)
}
var nspacer namespacer.Namespacer
Expand All @@ -80,6 +81,7 @@ func (p *testsProcessor) Run(ctx context.Context, tc engine.Context, tests ...di
name, err := names.Test(p.config.Discovery.FullName, test)
if err != nil {
logging.Log(ctx, logging.Internal, logging.ErrorStatus, color.BoldRed, logging.ErrSection(err))
tc.IncFailed()
failer.FailNow(ctx)
}
// 3. compute test scenarios
Expand Down

0 comments on commit a9d1db9

Please sign in to comment.