Skip to content

Commit

Permalink
chore: merged
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
  • Loading branch information
AlexsJones committed Apr 12, 2023
2 parents 5e5d4b6 + ca79ef9 commit 096321b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
46 changes: 26 additions & 20 deletions pkg/analysis/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand All @@ -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",
},
},
}

Expand All @@ -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",
}
Expand All @@ -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",
},
},
}

Expand Down

0 comments on commit 096321b

Please sign in to comment.