Skip to content

Commit

Permalink
feature: Implement Non-Zero Exit Code for Keploy Test Failures (#1366)
Browse files Browse the repository at this point in the history
* feat(command) : test return non-zero exit code

Signed-off-by: seipan <yamasakipann0218@gmail.com>

* fix : remove log & use os.Exit()

Signed-off-by: seipan <yamasakipann0218@gmail.com>

---------

Signed-off-by: seipan <yamasakipann0218@gmail.com>
Co-authored-by: Ritik Jain <60597329+re-Tick@users.noreply.github.com>
  • Loading branch information
seipan and re-Tick authored Jan 24, 2024
1 parent 1370d62 commit b557ded
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (t *Test) GetCmd() *cobra.Command {
}
t.logger.Debug("the configuration for mocking mongo connection", zap.Any("password", mongoPassword))

t.tester.Test(path, testReportPath, appCmd, test.TestOptions{
if !t.tester.Test(path, testReportPath, appCmd, test.TestOptions{
Tests: tests,
AppContainer: appContainer,
AppNetwork: networkName,
Expand All @@ -294,7 +294,9 @@ func (t *Test) GetCmd() *cobra.Command {
TestsetNoise: testsetNoise,
WithCoverage: withCoverage,
CoverageReportPath: coverageReportPath,
}, enableTele)
}, enableTele) {
os.Exit(1)
}

return nil
},
Expand Down

0 comments on commit b557ded

Please sign in to comment.