diff --git a/go.mod b/go.mod index e6eaf3f547..e0cbf9c8b1 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.3 k8s.io/kubectl v0.26.3 + ) require ( diff --git a/pkg/analysis/analysis_test.go b/pkg/analysis/analysis_test.go index 40733496a3..01bb194ae5 100644 --- a/pkg/analysis/analysis_test.go +++ b/pkg/analysis/analysis_test.go @@ -43,11 +43,12 @@ func TestAnalysis_ProblemJsonOutput(t *testing.T) { analysis := Analysis{ Results: []common.Result{ { - "Deployment", - "test-deployment", - []string{"test-problem"}, - "test-solution", - "parent-resource"}, + Kind: "Deployment", + Name: "test-deployment", + Error: []string{"test-problem"}, + Details: "test-solution", + ParentObject: "parent-resource", + }, }, Namespace: "default", } @@ -56,11 +57,13 @@ func TestAnalysis_ProblemJsonOutput(t *testing.T) { Status: StateProblemDetected, Problems: 1, Results: []common.Result{ - {"Deployment", - "test-deployment", - []string{"test-problem"}, - "test-solution", - "parent-resource"}, + { + Kind: "Deployment", + Name: "test-deployment", + Error: []string{"test-problem"}, + Details: "test-solution", + ParentObject: "parent-resource", + }, }, } @@ -85,11 +88,12 @@ func TestAnalysis_MultipleProblemJsonOutput(t *testing.T) { analysis := Analysis{ Results: []common.Result{ { - "Deployment", - "test-deployment", - []string{"test-problem", "another-test-problem"}, - "test-solution", - "parent-resource"}, + Kind: "Deployment", + Name: "test-deployment", + Error: []string{"test-problem", "another-test-problem"}, + Details: "test-solution", + ParentObject: "parent-resource", + }, }, Namespace: "default", } @@ -98,11 +102,13 @@ func TestAnalysis_MultipleProblemJsonOutput(t *testing.T) { Status: StateProblemDetected, Problems: 2, Results: []common.Result{ - {"Deployment", - "test-deployment", - []string{"test-problem", "another-test-problem"}, - "test-solution", - "parent-resource"}, + { + Kind: "Deployment", + Name: "test-deployment", + Error: []string{"test-problem", "another-test-problem"}, + Details: "test-solution", + ParentObject: "parent-resource", + }, }, }