Skip to content

Commit

Permalink
chore(tests): do not set images but instead allow operator defaults t…
Browse files Browse the repository at this point in the history
…o be used
  • Loading branch information
pmalek committed Jun 13, 2024
1 parent f610301 commit 71497fe
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/e2e/test_helm_install_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
k8sutils "github.com/kong/gateway-operator/pkg/utils/kubernetes"
testutils "github.com/kong/gateway-operator/pkg/utils/test"
"github.com/kong/gateway-operator/pkg/vars"
"github.com/kong/gateway-operator/test/helpers"
)

func init() {
Expand Down Expand Up @@ -360,10 +359,11 @@ func deploymentReadyConditions() []appsv1.DeploymentCondition {

func splitRepoVersionFromImage(t *testing.T, image string) (string, string) {
splitImage := strings.Split(image, ":")
if len(splitImage) != 2 {
l := len(splitImage)
if l < 2 {
t.Fatalf("image %q does not contain a tag", image)
}
return splitImage[0], splitImage[1]
return strings.Join(splitImage[:l-1], ":"), splitImage[l-1]
}

func baseGatewayConfigurationSpec() operatorv1beta1.GatewayConfigurationSpec {
Expand All @@ -375,8 +375,7 @@ func baseGatewayConfigurationSpec() operatorv1beta1.GatewayConfigurationSpec {
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: consts.DataPlaneProxyContainerName,
Image: helpers.GetDefaultDataPlaneImage(),
Name: consts.DataPlaneProxyContainerName,
ReadinessProbe: &corev1.Probe{
InitialDelaySeconds: 1,
PeriodSeconds: 1,
Expand All @@ -394,8 +393,7 @@ func baseGatewayConfigurationSpec() operatorv1beta1.GatewayConfigurationSpec {
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: consts.ControlPlaneControllerContainerName,
Image: consts.DefaultControlPlaneImage,
Name: consts.ControlPlaneControllerContainerName,
ReadinessProbe: &corev1.Probe{
InitialDelaySeconds: 1,
PeriodSeconds: 1,
Expand Down

0 comments on commit 71497fe

Please sign in to comment.