diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 53ba4be..411bf07 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -192,6 +192,26 @@ var _ = Describe("The maintenance controller", func() { Expect(eventList.Items).To(HaveLen(3)) }) + It("should remove the maintenance approval", func() { + Eventually(func(g Gomega) bool { + node := &corev1.Node{} + err := k8sClient.Get(context.Background(), maintainedKey, node) + g.Expect(err).To(Succeed()) + _, exists := node.Labels["cloud.sap/maintenance-approved"] + return exists + }).Should(BeFalse()) + }) + + It("should remove the flatcar approval", func() { + Eventually(func(g Gomega) bool { + node := &corev1.Node{} + err := k8sClient.Get(context.Background(), maintainedKey, node) + g.Expect(err).To(Succeed()) + _, exists := node.Labels["flatcar-linux-update.v1.flatcar-linux.net/reboot-ok"] + return exists + }).Should(BeFalse()) + }) + It("should recreate nodes with the kubernikus controller", func() { By("fetch node names") nodes := &v1.NodeList{} diff --git a/go.sum b/go.sum index 87edbac..39b906c 100644 --- a/go.sum +++ b/go.sum @@ -949,8 +949,6 @@ gopkg.in/hjson/hjson-go.v3 v3.0.1/go.mod h1:X6zrTSVeImfwfZLfgQdInl9mWjqPqgH90jom gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.5 h1:zfiCO0p88Fj4f6NR6KR5WdGMQ02U8vlDnN6HuD2xv5o= -gopkg.in/ini.v1 v1.66.5/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=