Skip to content

Commit

Permalink
Add environment variable RUN_ON_FAIL (#1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
iternity-dotcom committed Oct 18, 2021
1 parent f019966 commit d5d9452
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions functional_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ func logError(testName string, function string, args map[string]interface{}, sta
// addition to NotImplemented error returned from server
if isErrNotImplemented(err) {
ignoredLog(testName, function, args, startTime, message).Info()
} else if isRunOnFail() {
failureLog(testName, function, args, startTime, alert, message, err).Error()
} else {
failureLog(testName, function, args, startTime, alert, message, err).Fatal()
}
Expand Down Expand Up @@ -260,6 +262,10 @@ func isErrNotImplemented(err error) bool {
return minio.ToErrorResponse(err).Code == "NotImplemented"
}

func isRunOnFail() bool {
return os.Getenv("RUN_ON_FAIL") == "1"
}

func init() {
// If server endpoint is not set, all tests default to
// using https://play.min.io
Expand Down

0 comments on commit d5d9452

Please sign in to comment.