Skip to content

Commit

Permalink
chore: update helm upgrade tests, after Kong bump to 3.9 DataPlanes a…
Browse files Browse the repository at this point in the history
…re expected to be patched
  • Loading branch information
pmalek committed Dec 23, 2024
1 parent ac61cd1 commit 5aaadec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/test_helm_install_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ func TestHelmUpgrade(t *testing.T) {
},
},
{
Name: fmt.Sprintf("DataPlane deployment is patched after operator upgrade (due to change in default Kong image version to %q)", helpers.GetDefaultDataPlaneImage()),
Name: "DataPlane deployment is patched after operator upgrade (due to change in default Kong image version to kong:3.8)",
Func: func(c *assert.CollectT, cl *testutils.K8sClients) {
gatewayDataPlaneDeploymentIsPatched("gw-upgrade-onebeforelatestminor-latestminor=true")(ctx, c, cl.MgrClient)
gatewayDataPlaneDeploymentHasImageSetTo("gw-upgrade-onebeforelatestminor-latestminor=true", helpers.GetDefaultDataPlaneImage())(ctx, c, cl.MgrClient)
gatewayDataPlaneDeploymentHasImageSetTo("gw-upgrade-onebeforelatestminor-latestminor=true", "kong:3.8")(ctx, c, cl.MgrClient)
},
},
{
Expand Down Expand Up @@ -194,7 +194,7 @@ func TestHelmUpgrade(t *testing.T) {
{
Name: "DataPlane deployment is not patched after operator upgrade",
Func: func(c *assert.CollectT, cl *testutils.K8sClients) {
gatewayDataPlaneDeploymentIsNotPatched("gw-upgrade-latestminor-current=true")(ctx, c, cl.MgrClient)
gatewayDataPlaneDeploymentIsPatched("gw-upgrade-latestminor-current=true")(ctx, c, cl.MgrClient)
},
},
{
Expand Down Expand Up @@ -265,7 +265,7 @@ func TestHelmUpgrade(t *testing.T) {
{
Name: "DataPlane deployment is not patched after operator upgrade",
Func: func(c *assert.CollectT, cl *testutils.K8sClients) {
gatewayDataPlaneDeploymentIsNotPatched("gw-upgrade-nightly-to-current=true")(ctx, c, cl.MgrClient)
gatewayDataPlaneDeploymentIsPatched("gw-upgrade-nightly-to-current=true")(ctx, c, cl.MgrClient)
},
},
{
Expand Down Expand Up @@ -293,7 +293,7 @@ func TestHelmUpgrade(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
// Repository is different for OSS and Enterprise images and it should be set accordingly.
var kgoImageRepository = "docker.io/kong/gateway-operator-oss"
kgoImageRepository := "docker.io/kong/gateway-operator-oss"
if helpers.GetDefaultDataPlaneBaseImage() == consts.DefaultDataPlaneBaseEnterpriseImage {
kgoImageRepository = "docker.io/kong/gateway-operator"
}
Expand Down Expand Up @@ -518,7 +518,7 @@ func gatewayDataPlaneDeploymentHasImageSetTo(
})
}

func gatewayDataPlaneDeploymentIsNotPatched(
func gatewayDataPlaneDeploymentIsNotPatched( //nolint:unused
gatewayLabelSelector string,
) func(context.Context, *assert.CollectT, client.Client) {
return gatewayDataPlaneDeploymentCheck(gatewayLabelSelector, func(d *appsv1.Deployment) error {
Expand Down

0 comments on commit 5aaadec

Please sign in to comment.