Skip to content

Commit

Permalink
test: Fix Drift Start-up Taint Test Flake (aws#6547)
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam authored Jul 18, 2024
1 parent e87e0e1 commit c87c2ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/suites/drift/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,10 @@ var _ = Describe("Drift", func() {
// Remove the startup taints from the new nodes to initialize them
Eventually(func(g Gomega) {
g.Expect(env.Client.Get(env.Context, client.ObjectKeyFromObject(nodeTwo), nodeTwo)).To(Succeed())
_, found := lo.Find(nodeTwo.Spec.Taints, func(t corev1.Taint) bool {
return t.MatchTaint(&corev1.Taint{Key: "example.com/another-taint-2", Effect: corev1.TaintEffectNoExecute})
})
g.Expect(found).To(BeTrue())
stored := nodeTwo.DeepCopy()
nodeTwo.Spec.Taints = lo.Reject(nodeTwo.Spec.Taints, func(t corev1.Taint, _ int) bool { return t.Key == "example.com/another-taint-2" })
g.Expect(env.Client.Patch(env.Context, nodeTwo, client.StrategicMergeFrom(stored))).To(Succeed())
Expand Down

0 comments on commit c87c2ee

Please sign in to comment.