diff --git a/test/extended/util/util.go b/test/extended/util/util.go index f717e06ead..32bb59f903 100644 --- a/test/extended/util/util.go +++ b/test/extended/util/util.go @@ -269,7 +269,14 @@ func LoginToOcCluster(options []string) error { ocLoginAsAdminCommand = ocLoginAsAdminCommand + " " + option } - return ExecuteCommand(ocLoginAsAdminCommand) + err = ExecuteCommand(ocLoginAsAdminCommand) + + exitcode := GetLastCommandOutput("exitcode") + if exitcode != "0" { + stderr := GetLastCommandOutput("stderr") + return fmt.Errorf(stderr) + } + return err } // LoginToOcClusterSucceedsOrFails is a wrapper for LoginToOcCluster