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

Commit

Permalink
Merge pull request #3865 from openservicemesh/mergify/bp/release-v0.9…
Browse files Browse the repository at this point in the history
…/pr-3748

test(e2e): Configure e2e ports for OpenShift (backport #3748)
  • Loading branch information
nshankar13 authored Jul 27, 2021
2 parents ed16e2b + 5b5847c commit c9b80d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
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

0 comments on commit c9b80d1

Please sign in to comment.