diff --git a/examples/preflight/host/cpu.yaml b/examples/preflight/host/cpu.yaml index 1cd09aae..4d794d16 100644 --- a/examples/preflight/host/cpu.yaml +++ b/examples/preflight/host/cpu.yaml @@ -19,4 +19,3 @@ spec: message: At least 16 CPU cores preferred - pass: message: This server has sufficient CPU cores - diff --git a/pkg/analyze/common_status.go b/pkg/analyze/common_status.go index 23af59a8..a1e48139 100644 --- a/pkg/analyze/common_status.go +++ b/pkg/analyze/common_status.go @@ -2,10 +2,11 @@ package analyzer import ( "fmt" - "github.com/pkg/errors" - troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" "strconv" "strings" + + "github.com/pkg/errors" + troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" ) func commonStatus(outcomes []*troubleshootv1beta2.Outcome, name string, iconKey string, iconURI string, readyReplicas int, exists bool, resourceType string) (*AnalyzeResult, error) { @@ -64,7 +65,7 @@ func commonStatus(outcomes []*troubleshootv1beta2.Outcome, name string, iconKey if exists == false && outcome.Warn.When != "absent" { result.IsFail = true result.Message = fmt.Sprintf("The %s %q was not found", resourceType, name) - result.URI = outcome.Fail.URI + result.URI = outcome.Warn.URI return result, nil } @@ -104,7 +105,7 @@ func commonStatus(outcomes []*troubleshootv1beta2.Outcome, name string, iconKey if exists == false && outcome.Pass.When != "absent" { result.IsFail = true result.Message = fmt.Sprintf("The %s %q was not found", resourceType, name) - result.URI = outcome.Fail.URI + result.URI = outcome.Pass.URI return result, nil }