Skip to content

Commit 87171a2

Browse files
hdurand0710Gopher Bot
authored andcommitted
CLEANUP: remove unused function in conformance test helpers
1 parent a169db8 commit 87171a2

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

test/conformance/helpers_test.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,11 @@ package conformance_test
1818

1919
import (
2020
"context"
21-
"net"
2221

2322
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2423
clientset "k8s.io/client-go/kubernetes"
2524
)
2625

27-
// newPortRemappingDialer returns a DialContext function that remaps Gateway API
28-
// standard ports (80, 443) to the actual NodePort ports HUG listens on.
29-
// This is needed because the conformance tests construct URLs using the
30-
// listener port from the Gateway spec (80/443), but HUG serves traffic
31-
// on NodePort ports (e.g. 31080/31443).
32-
func newPortRemappingDialer(httpPort, httpsPort string) func(ctx context.Context, network, addr string) (net.Conn, error) {
33-
portMap := map[string]string{
34-
"80": httpPort,
35-
"443": httpsPort,
36-
}
37-
return func(ctx context.Context, network, addr string) (net.Conn, error) {
38-
host, port, err := net.SplitHostPort(addr)
39-
if err != nil {
40-
return nil, err
41-
}
42-
if mappedPort, ok := portMap[port]; ok {
43-
addr = net.JoinHostPort(host, mappedPort)
44-
}
45-
var d net.Dialer
46-
return d.DialContext(ctx, network, addr)
47-
}
48-
}
49-
5026
// getNodeIP returns the InternalIP of the first Ready node in the cluster.
5127
func getNodeIP(ctx context.Context, cs clientset.Interface) string {
5228
nodes, err := cs.CoreV1().Nodes().List(ctx, metav1.ListOptions{})

0 commit comments

Comments
 (0)