Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

test(e2e): Configure e2e ports for OpenShift (backport #3748) #3865

Merged
merged 1 commit into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/e2e/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package e2e

const (
// appPort is the port to be used for server and client applications
appPort = 14001
)
9 changes: 5 additions & 4 deletions tests/e2e/e2e_trafficsplit_same_sa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ var _ = OSMDescribe("Test TrafficSplit where each backend shares the same Servic
Namespace: serverNamespace,
ReplicaCount: int32(serverReplicaSet),
Image: "simonkowallik/httpbin",
Ports: []int{80},
Ports: []int{appPort},
Command: []string{"gunicorn", "-b", fmt.Sprintf("0.0.0.0:%d", appPort), "httpbin:app", "-k", "gevent"},
})

// Expose an env variable such as XHTTPBIN_X_POD_NAME:
Expand Down Expand Up @@ -121,7 +122,7 @@ var _ = OSMDescribe("Test TrafficSplit where each backend shares the same Servic
Command: []string{"/bin/bash", "-c", "--"},
Args: []string{"while true; do sleep 30; done;"},
Image: "songrgg/alpine-debug",
Ports: []int{80},
Ports: []int{appPort},
})

_, err := Td.CreateServiceAccount(clientApp, &svcAccDef)
Expand Down Expand Up @@ -164,7 +165,7 @@ var _ = OSMDescribe("Test TrafficSplit where each backend shares the same Servic
_, _, trafficSplitService := Td.SimplePodApp(SimplePodAppDef{
Name: trafficSplitName,
Namespace: serverNamespace,
Ports: []int{80},
Ports: []int{appPort},
})

// Creating trafficsplit service in K8s
Expand Down Expand Up @@ -211,7 +212,7 @@ var _ = OSMDescribe("Test TrafficSplit where each backend shares the same Servic
SourceContainer: ns, // container_name == NS for this test

// Targeting the trafficsplit FQDN
Destination: fmt.Sprintf("%s.%s", trafficSplitName, serverNamespace),
Destination: fmt.Sprintf("%s.%s:%d", trafficSplitName, serverNamespace, appPort),
})
}
}
Expand Down