Skip to content

Commit 2276d08

Browse files
fix: exit code when failing in root test run (#2002) (#2003)
Signed-off-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: Charles-Edouard Brétéché <[email protected]>
1 parent c170264 commit 2276d08

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/runner/processors/tests.go

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func (p *testsProcessor) Run(ctx context.Context, tc engine.Context, tests ...di
6868
tc, namespace, err := setupContextData(ctx, tc, contextData)
6969
if err != nil {
7070
logging.Log(ctx, logging.Internal, logging.ErrorStatus, color.BoldRed, logging.ErrSection(err))
71+
tc.IncFailed()
7172
failer.FailNow(ctx)
7273
}
7374
var nspacer namespacer.Namespacer
@@ -80,6 +81,7 @@ func (p *testsProcessor) Run(ctx context.Context, tc engine.Context, tests ...di
8081
name, err := names.Test(p.config.Discovery.FullName, test)
8182
if err != nil {
8283
logging.Log(ctx, logging.Internal, logging.ErrorStatus, color.BoldRed, logging.ErrSection(err))
84+
tc.IncFailed()
8385
failer.FailNow(ctx)
8486
}
8587
// 3. compute test scenarios

0 commit comments

Comments
 (0)