Skip to content

Commit

Permalink
failing drift test
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam committed Aug 7, 2023
1 parent 852eaba commit 7aed7ec
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions test/suites/drift/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,16 @@ var _ = Describe("Drift", Label("AWS"), func() {

// Nodes will need to have the start-up taint removed before the node can be considered as initialized
if fieldName == "Start-up Taint" {
nodes := env.EventuallyExpectCreatedNodeCount("==", 2)
sort.Slice(nodes, func(i int, j int) bool {
return nodes[i].CreationTimestamp.Before(&nodes[j].CreationTimestamp)
})
nodeTwo := nodes[1]
nodeTwo.Spec.Taints = []v1.Taint{}
env.ExpectCreatedOrUpdated(nodeTwo)
Eventually(func(g Gomega) {
nodes := env.EventuallyExpectCreatedNodeCount("==", 2)
sort.Slice(nodes, func(i int, j int) bool {
return nodes[i].CreationTimestamp.Before(&nodes[j].CreationTimestamp)
})
nodeTwo := nodes[1]
stored := nodeTwo.DeepCopy()
nodeTwo.Spec.Taints = []v1.Taint{}
g.Expect(env.Client.Patch(env.Context, nodeTwo, client.MergeFrom(stored))).To(Succeed())
}).Should(Succeed())
}

env.EventuallyExpectNotFound(pod, node)
Expand Down

0 comments on commit 7aed7ec

Please sign in to comment.