tests, infra-test, Add missing check on AfterEach
The AfterEach didnt check if selectedNode isnt nil,
as such deref of it might panic.
@@ -226,6 +226,7 @@ var _ = Describe("[Serial]Infrastructure", func() {
})
AfterEach(func() {
+ if selectedNode != nil {
By("removing the taint from the tainted node")
var taints []k8sv1.Taint
@@ -244,6 +245,7 @@ var _ = Describe("[Serial]Infrastructure", func() {
return err
})
Expect(err).ShouldNot(HaveOccurred())
+ }
})
It("[test_id:4134] kubevirt components on that node should not evict", func() {
