Skip to content

Commit 0cc5725

Browse files
authored
Merge pull request kubernetes#125860 from saschagrunert/apparmor-rejection
Fix kubelet AppArmor rejection test
2 parents 30ffa52 + 2df9201 commit 0cc5725

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/e2e_node/apparmor_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var _ = SIGDescribe("AppArmor", feature.AppArmor, nodefeature.AppArmor, func() {
9292

9393
ginkgo.It("should reject a pod with an AppArmor profile", func(ctx context.Context) {
9494
status := runAppArmorTest(ctx, f, false, v1.DeprecatedAppArmorBetaProfileRuntimeDefault)
95-
expectSoftRejection(status)
95+
expectRejection(status)
9696
})
9797
})
9898
}
@@ -229,12 +229,11 @@ func createPodWithAppArmor(ctx context.Context, f *framework.Framework, profile
229229
return e2epod.NewPodClient(f).Create(ctx, pod)
230230
}
231231

232-
func expectSoftRejection(status v1.PodStatus) {
232+
func expectRejection(status v1.PodStatus) {
233233
args := []interface{}{"PodStatus: %+v", status}
234-
gomega.Expect(status.Phase).To(gomega.Equal(v1.PodPending), args...)
234+
gomega.Expect(status.Phase).To(gomega.Equal(v1.PodFailed), args...)
235235
gomega.Expect(status.Reason).To(gomega.Equal("AppArmor"), args...)
236236
gomega.Expect(status.Message).To(gomega.ContainSubstring("AppArmor"), args...)
237-
gomega.Expect(status.ContainerStatuses[0].State.Waiting.Reason).To(gomega.Equal("Blocked"), args...)
238237
}
239238

240239
func isAppArmorEnabled() bool {

0 commit comments

Comments
 (0)