Skip to content

Commit 978aab2

Browse files
authored
Fix status field in Gatekeeper expander (#22)
Signed-off-by: Dale Haiducek <[email protected]>
1 parent 80f9c5a commit 978aab2

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

internal/expanders/gatekeeper.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,8 @@ func (g GatekeeperPolicyExpander) Expand(
7575
"metadata": map[string]interface{}{
7676
"name": constraintName,
7777
},
78-
"status": []map[string]interface{}{
79-
{
80-
"totalViolations": 0,
81-
},
78+
"status": map[string]interface{}{
79+
"totalViolations": 0,
8280
},
8381
},
8482
},

internal/expanders/gatekeeper_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ func TestGatekeeperExpand(t *testing.T) {
110110
"metadata": map[string]interface{}{
111111
"name": "my-awesome-constraint",
112112
},
113-
"status": []map[string]interface{}{
114-
{
115-
"totalViolations": 0,
116-
},
113+
"status": map[string]interface{}{
114+
"totalViolations": 0,
117115
},
118116
},
119117
},

0 commit comments

Comments
 (0)