Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update test to reduce create fleet payload size v0.35.x #7087

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/suites/integration/termination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var _ = Describe("Termination", func() {
env.ExpectDeleted(nodes[0])
env.EventuallyExpectNotFound(nodes[0])
Eventually(func(g Gomega) {
g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(Equal("shutting-down"))
g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(BeElementOf("shutting-down", "terminated"))
}, time.Second*10).Should(Succeed())
})
})
2 changes: 1 addition & 1 deletion test/suites/nodeclaim/garbage_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ var _ = Describe("GarbageCollection", func() {
// Eventually expect the node and the instance to be removed (shutting-down)
env.EventuallyExpectNotFound(node)
Eventually(func(g Gomega) {
g.Expect(lo.FromPtr(env.GetInstanceByID(aws.StringValue(out.Instances[0].InstanceId)).State.Name)).To(Equal("shutting-down"))
g.Expect(lo.FromPtr(env.GetInstanceByID(aws.StringValue(out.Instances[0].InstanceId)).State.Name)).To(BeElementOf("shutting-down", "terminated"))
}, time.Second*10).Should(Succeed())
})
It("should succeed to garbage collect an Instance that was deleted without the cluster's knowledge", func() {
Expand Down
25 changes: 23 additions & 2 deletions test/suites/nodeclaim/nodeclaim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ var _ = Describe("StandaloneNodeClaim", func() {
Values: []string{"c"},
},
},
{
NodeSelectorRequirement: v1.NodeSelectorRequirement{
Key: v1.LabelArchStable,
Operator: v1.NodeSelectorOpIn,
Values: []string{"arm64"},
},
},
{
NodeSelectorRequirement: v1.NodeSelectorRequirement{
Key: corev1beta1.CapacityTypeLabelKey,
Expand Down Expand Up @@ -201,6 +208,13 @@ var _ = Describe("StandaloneNodeClaim", func() {
Values: []string{"c"},
},
},
{
NodeSelectorRequirement: v1.NodeSelectorRequirement{
Key: v1.LabelArchStable,
Operator: v1.NodeSelectorOpIn,
Values: []string{"arm64"},
},
},
{
NodeSelectorRequirement: v1.NodeSelectorRequirement{
Key: corev1beta1.CapacityTypeLabelKey,
Expand All @@ -226,7 +240,7 @@ var _ = Describe("StandaloneNodeClaim", func() {
env.EventuallyExpectNotFound(nodeClaim, node)

Eventually(func(g Gomega) {
g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(Equal("shutting-down"))
g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(BeElementOf("shutting-down", "terminated"))
}, time.Second*10).Should(Succeed())
})
It("should delete a NodeClaim from the node termination finalizer", func() {
Expand All @@ -240,6 +254,13 @@ var _ = Describe("StandaloneNodeClaim", func() {
Values: []string{"c"},
},
},
{
NodeSelectorRequirement: v1.NodeSelectorRequirement{
Key: v1.LabelArchStable,
Operator: v1.NodeSelectorOpIn,
Values: []string{"arm64"},
},
},
{
NodeSelectorRequirement: v1.NodeSelectorRequirement{
Key: corev1beta1.CapacityTypeLabelKey,
Expand All @@ -265,7 +286,7 @@ var _ = Describe("StandaloneNodeClaim", func() {
env.EventuallyExpectNotFound(nodeClaim, node)

Eventually(func(g Gomega) {
g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(Equal("shutting-down"))
g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(BeElementOf("shutting-down", "terminated"))
}, time.Second*10).Should(Succeed())
})
It("should create a NodeClaim with custom labels passed through the userData", func() {
Expand Down
Loading