Merge pull request #190 from MikaelSmith/error-on-connect-fail

Report errors connecting to the database
This commit is contained in:
Andrew Lavery
2020-05-13 19:38:20 -04:00
committed by GitHub

View File

@@ -39,6 +39,12 @@ func analyzePostgres(analyzer *troubleshootv1beta1.DatabaseAnalyze, getCollected
IconURI: "https://troubleshoot.sh/images/analyzer-icons/postgres-analyze.svg",
}
if databaseConnection.Error != "" {
result.IsFail = true
result.Message = databaseConnection.Error
return result, nil
}
for _, outcome := range analyzer.Outcomes {
if outcome.Fail != nil {
if outcome.Fail.When == "" {