Skip to content

Commit 22f0823

Browse files
hasheddank8s-ci-robot
authored andcommitted
Fix event parsing in invalid profile e2e test
Signed-off-by: hasheddan <[email protected]>
1 parent ea1c0fd commit 22f0823

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

internal/pkg/controllers/profile/profile_test.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,7 @@ func TestReconcile(t *testing.T) {
108108
"GotProfile": {
109109
rec: &Reconciler{
110110
client: &test.MockClient{
111-
MockGet: test.NewMockGetFn(nil, func(obj runtime.Object) error {
112-
obj = &corev1.ConfigMap{
113-
ObjectMeta: metav1.ObjectMeta{
114-
Name: name,
115-
Namespace: namespace,
116-
},
117-
}
118-
return nil
119-
}),
111+
MockGet: test.NewMockGetFn(nil),
120112
},
121113
log: log.Log,
122114
record: event.NewNopRecorder(),

test/tc_invalid_profile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ data:
6464
eventsOutput := e.kubectl("get", "events")
6565
for _, s := range []string{
6666
"Warning",
67-
"cannot validate profile " + profileName,
67+
"InvalidSeccompProfile",
6868
"configmap/" + configMapName,
6969
"decoding seccomp profile: json: cannot unmarshal bool into " +
7070
"Go struct field Seccomp.defaultAction of type seccomp.Action",

0 commit comments

Comments
 (0)