Skip to content

Commit

Permalink
disable backendtlspolicy in upgrade test
Browse files Browse the repository at this point in the history
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
  • Loading branch information
sunjayBhatia committed May 6, 2024
1 parent a4cdc21 commit a344c67
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion test/e2e/upgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
gatewayapi_v1 "sigs.k8s.io/gateway-api/apis/v1"

contour_v1 "github.com/projectcontour/contour/apis/projectcontour/v1"
contour_v1alpha1 "github.com/projectcontour/contour/apis/projectcontour/v1alpha1"
"github.com/projectcontour/contour/internal/k8s"
"github.com/projectcontour/contour/test/e2e"
)
Expand Down Expand Up @@ -144,15 +145,39 @@ var _ = Describe("When upgrading", func() {
cmd := exec.Command("../../scripts/install-provisioner-release.sh", contourUpgradeFromVersion)
sess, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter)
require.NoError(f.T(), err)

Eventually(sess, f.RetryTimeout, f.RetryInterval).Should(gexec.Exit(0))

// TODO: remove this.
// Disable BackendTLSPolicy for now since the upgrade from Gateway
// API v1.0.0 to v1.1.0 removes the v1alpha2 version of the resource
// completely in favor of v1alpha3 with no backward compatibility.
contourDeployment := &contour_v1alpha1.ContourDeployment{
ObjectMeta: meta_v1.ObjectMeta{
Name: "upgrade-test-params",
Namespace: "projectcontour",
},
Spec: contour_v1alpha1.ContourDeploymentSpec{
Contour: &contour_v1alpha1.ContourSettings{
DisabledFeatures: []contour_v1.Feature{
"backendtlspolicies",
},
},
},
}
require.NoError(f.T(), f.Client.Create(context.Background(), contourDeployment))

require.True(f.T(), f.CreateGatewayClassAndWaitFor(&gatewayapi_v1.GatewayClass{
ObjectMeta: meta_v1.ObjectMeta{
Name: gatewayClassName,
},
Spec: gatewayapi_v1.GatewayClassSpec{
ControllerName: gatewayapi_v1.GatewayController("projectcontour.io/gateway-controller"),
ParametersRef: &gatewayapi_v1.ParametersReference{
Group: "projectcontour.io",
Kind: "ContourDeployment",
Name: "upgrade-test-params",
Namespace: ptr.To(gatewayapi_v1.Namespace("projectcontour")),
},
},
}, e2e.GatewayClassAccepted))
})
Expand Down

0 comments on commit a344c67

Please sign in to comment.