diff --git a/integration/tests/update/update_cluster_test.go b/integration/tests/update/update_cluster_test.go index 643dba80950..5c00c01de6a 100644 --- a/integration/tests/update/update_cluster_test.go +++ b/integration/tests/update/update_cluster_test.go @@ -60,6 +60,7 @@ var ( const ( initNG = "kp-ng-0" + botNG = "bot-ng-0" ) var _ = BeforeSuite(func() { @@ -104,6 +105,19 @@ var _ = BeforeSuite(func() { "--kubeconfig", params.KubeconfigPath, ) Expect(cmd).To(RunSuccessfully()) + + cmd = params.EksctlCreateCmd.WithArgs( + "nodegroup", + "--verbose", "4", + "--cluster", defaultCluster, + "--tags", "alpha.eksctl.io/description=eksctl integration test", + "--name", botNG, + "--node-type", "t3.small", + "--nodes", "1", + "--node-ami-family", "Bottlerocket", + "--node-labels", "ng-name="+botNG, + ) + Expect(cmd).To(RunSuccessfully()) }) var _ = Describe("(Integration) Upgrading cluster", func() { @@ -200,7 +214,7 @@ var _ = Describe("(Integration) Upgrading cluster", func() { }) Context("nodegroup", func() { - It("should upgrade the nodegroup to the next version", func() { + It("should upgrade the initial nodegroup to the next version", func() { cmd := params.EksctlUpgradeCmd.WithArgs( "nodegroup", "--verbose", "4", @@ -219,6 +233,26 @@ var _ = Describe("(Integration) Upgrading cluster", func() { ) ExpectWithOffset(1, cmd).To(RunSuccessfullyWithOutputString(ContainSubstring(fmt.Sprintf("Version: \"%s\"", nextEKSVersion)))) }) + + It("should upgrade the Bottlerocket nodegroup to the next version", func() { + cmd := params.EksctlUpgradeCmd.WithArgs( + "nodegroup", + "--verbose", "4", + "--cluster", params.ClusterName, + "--name", botNG, + "--kubernetes-version", nextEKSVersion, + "--timeout=60m", // wait for CF stacks to finish update + ) + ExpectWithOffset(1, cmd).To(RunSuccessfullyWithOutputString(ContainSubstring("nodegroup successfully upgraded"))) + + cmd = params.EksctlGetCmd.WithArgs( + "nodegroup", + "--cluster", params.ClusterName, + "--name", botNG, + "--output", "yaml", + ) + ExpectWithOffset(1, cmd).To(RunSuccessfullyWithOutputString(ContainSubstring(fmt.Sprintf("Version: \"%s\"", nextEKSVersion)))) + }) }) })