Skip to content

Commit 096321b

Browse files
committed
chore: merged
Signed-off-by: Alex Jones <[email protected]>
2 parents 5e5d4b6 + ca79ef9 commit 096321b

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ require (
1818
k8s.io/apimachinery v0.26.3
1919
k8s.io/client-go v0.26.3
2020
k8s.io/kubectl v0.26.3
21+
2122
)
2223

2324
require (

pkg/analysis/analysis_test.go

+26-20
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ func TestAnalysis_ProblemJsonOutput(t *testing.T) {
4343
analysis := Analysis{
4444
Results: []common.Result{
4545
{
46-
"Deployment",
47-
"test-deployment",
48-
[]string{"test-problem"},
49-
"test-solution",
50-
"parent-resource"},
46+
Kind: "Deployment",
47+
Name: "test-deployment",
48+
Error: []string{"test-problem"},
49+
Details: "test-solution",
50+
ParentObject: "parent-resource",
51+
},
5152
},
5253
Namespace: "default",
5354
}
@@ -56,11 +57,13 @@ func TestAnalysis_ProblemJsonOutput(t *testing.T) {
5657
Status: StateProblemDetected,
5758
Problems: 1,
5859
Results: []common.Result{
59-
{"Deployment",
60-
"test-deployment",
61-
[]string{"test-problem"},
62-
"test-solution",
63-
"parent-resource"},
60+
{
61+
Kind: "Deployment",
62+
Name: "test-deployment",
63+
Error: []string{"test-problem"},
64+
Details: "test-solution",
65+
ParentObject: "parent-resource",
66+
},
6467
},
6568
}
6669

@@ -85,11 +88,12 @@ func TestAnalysis_MultipleProblemJsonOutput(t *testing.T) {
8588
analysis := Analysis{
8689
Results: []common.Result{
8790
{
88-
"Deployment",
89-
"test-deployment",
90-
[]string{"test-problem", "another-test-problem"},
91-
"test-solution",
92-
"parent-resource"},
91+
Kind: "Deployment",
92+
Name: "test-deployment",
93+
Error: []string{"test-problem", "another-test-problem"},
94+
Details: "test-solution",
95+
ParentObject: "parent-resource",
96+
},
9397
},
9498
Namespace: "default",
9599
}
@@ -98,11 +102,13 @@ func TestAnalysis_MultipleProblemJsonOutput(t *testing.T) {
98102
Status: StateProblemDetected,
99103
Problems: 2,
100104
Results: []common.Result{
101-
{"Deployment",
102-
"test-deployment",
103-
[]string{"test-problem", "another-test-problem"},
104-
"test-solution",
105-
"parent-resource"},
105+
{
106+
Kind: "Deployment",
107+
Name: "test-deployment",
108+
Error: []string{"test-problem", "another-test-problem"},
109+
Details: "test-solution",
110+
ParentObject: "parent-resource",
111+
},
106112
},
107113
}
108114

0 commit comments

Comments
 (0)