Skip to content

Commit

Permalink
Use url.Scheme to determine port number (#289)
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Short <todd.short@me.com>
  • Loading branch information
tmshort committed Jun 24, 2024
1 parent 6055e54 commit 7558b05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/e2e/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ var _ = Describe("ClusterCatalog Unpacking", func() {
// the ProxyGet() call below needs an explicit port value, so if
// value from url.Port() is empty, we assume port 443.
if port == "" {
port = "443"
if url.Scheme == "https" {
port = "443"
} else {
port = "80"
}
}
resp := kubeClient.CoreV1().Services(ns).ProxyGet(url.Scheme, name, port, url.Path, map[string]string{})
rc, err := resp.Stream(ctx)
Expand Down

0 comments on commit 7558b05

Please sign in to comment.