Skip to content

Commit

Permalink
test: Fix E2E test for release-v0.31.x (#5639)
Browse files Browse the repository at this point in the history
engedaam authored Feb 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent e232f21 commit 1fc83a2
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/suites/drift/suite_test.go
Original file line number Diff line number Diff line change
@@ -365,7 +365,7 @@ var _ = Describe("Drift", Label("AWS"), func() {

// Drift the machine with bad configuration
parameter, err := env.SSMAPI.GetParameter(&ssm.GetParameterInput{
Name: awssdk.String("/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs"),
Name: awssdk.String("/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"),
})
Expect(err).ToNot(HaveOccurred())
nodeTemplate.Spec.AMISelector = map[string]string{"aws::ids": *parameter.Parameter.Value}
2 changes: 1 addition & 1 deletion test/suites/expiration/expiration_test.go
Original file line number Diff line number Diff line change
@@ -225,7 +225,7 @@ var _ = Describe("Expiration", func() {

// Set a configuration that will not register a machine
parameter, err := env.SSMAPI.GetParameter(&ssm.GetParameterInput{
Name: lo.ToPtr("/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs"),
Name: lo.ToPtr("/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"),
})
Expect(err).ToNot(HaveOccurred())
nodeTemplate.Spec.AMISelector = map[string]string{"aws::ids": *parameter.Parameter.Value}
5 changes: 4 additions & 1 deletion test/suites/integration/scheduling_test.go
Original file line number Diff line number Diff line change
@@ -352,7 +352,10 @@ var _ = Describe("Scheduling", Ordered, ContinueOnFailure, func() {

env.ExpectCreated(provisioner, provider, deployment)
env.EventuallyExpectHealthyPodCount(labels.SelectorFromSet(podLabels), 3)
env.ExpectCreatedNodeCount("==", 3)
// Karpenter will launch three nodes, however if all three nodes don't get register with the cluster at the same time, two pods will be placed on one node.
// This can result in a case where all 3 pods are healthy, while there are only two created nodes.
// In that case, we still expect to eventually have three nodes.
env.EventuallyExpectNodeCount("==", 3)
})
It("should provision a node using a provisioner with higher priority", func() {
provisionerLowPri := test.Provisioner(test.ProvisionerOptions{

0 comments on commit 1fc83a2

Please sign in to comment.