Skip to content

Commit

Permalink
Check nodegroup was indeed upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiang-zhang committed Mar 20, 2024
1 parent 097db11 commit f85c25c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions integration/tests/update/update_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ var _ = BeforeSuite(func() {
)
Expect(cmd).To(RunSuccessfully())
})
var _ = Describe("(Integration) Update addons", func() {
var _ = Describe("(Integration) Upgrading cluster", func() {

Context("update cluster and addons", func() {
Context("control plane", func() {
It("should have created an EKS cluster and two CloudFormation stacks", func() {
config := NewConfig(params.Region)

Expand Down Expand Up @@ -139,7 +139,9 @@ var _ = Describe("(Integration) Update addons", func() {
return fmt.Sprintf("%s.%s", serverVersion.Major, strings.TrimSuffix(serverVersion.Minor, "+"))
}, k8sUpdatePollTimeout, k8sUpdatePollInterval).Should(Equal(nextEKSVersion))
})
})

Context("addons", func() {
It("should upgrade kube-proxy", func() {
cmd := params.EksctlUtilsCmd.WithArgs(
"update-kube-proxy",
Expand Down Expand Up @@ -195,6 +197,9 @@ var _ = Describe("(Integration) Update addons", func() {
Expect(cmd).To(RunSuccessfully())
})

})

Context("nodegroup", func() {
It("should upgrade the nodegroup to the next version", func() {
cmd := params.EksctlUpgradeCmd.WithArgs(
"nodegroup",
Expand All @@ -205,6 +210,14 @@ var _ = Describe("(Integration) Update addons", func() {
"--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", initNG,
"--output", "yaml",
)
ExpectWithOffset(1, cmd).To(RunSuccessfullyWithOutputString(ContainSubstring(fmt.Sprintf("Version: \"%s\"", nextEKSVersion))))
})
})
})
Expand Down

0 comments on commit f85c25c

Please sign in to comment.