diff --git a/tests/e2e/kubetest2-kops/deployer/up.go b/tests/e2e/kubetest2-kops/deployer/up.go index 2d24685724..3cba788466 100644 --- a/tests/e2e/kubetest2-kops/deployer/up.go +++ b/tests/e2e/kubetest2-kops/deployer/up.go @@ -27,7 +27,7 @@ import ( "k8s.io/kops/tests/e2e/kubetest2-kops/aws" "k8s.io/kops/tests/e2e/kubetest2-kops/do" "k8s.io/kops/tests/e2e/kubetest2-kops/gce" - "k8s.io/kops/tests/e2e/kubetest2-kops/util" + "k8s.io/kops/tests/e2e/pkg/util" "sigs.k8s.io/kubetest2/pkg/exec" ) diff --git a/tests/e2e/kubetest2-kops/util/http.go b/tests/e2e/pkg/util/http.go similarity index 91% rename from tests/e2e/kubetest2-kops/util/http.go rename to tests/e2e/pkg/util/http.go index 02b9c87c31..d525d9344a 100644 --- a/tests/e2e/kubetest2-kops/util/http.go +++ b/tests/e2e/pkg/util/http.go @@ -32,8 +32,8 @@ func init() { httpTransport.RegisterProtocol("file", http.NewFileTransport(http.Dir("/"))) } -// httpGETWithHeaders writes the response of an HTTP GET request -func httpGETWithHeaders(url string, headers map[string]string, writer io.Writer) error { +// HTTPGETWithHeaders writes the response of an HTTP GET request +func HTTPGETWithHeaders(url string, headers map[string]string, writer io.Writer) error { klog.Infof("curl %s", url) c := &http.Client{Transport: httpTransport} req, err := http.NewRequest("GET", url, nil) diff --git a/tests/e2e/kubetest2-kops/util/publicip.go b/tests/e2e/pkg/util/publicip.go similarity index 94% rename from tests/e2e/kubetest2-kops/util/publicip.go rename to tests/e2e/pkg/util/publicip.go index 892447499f..aeeed6cc6a 100644 --- a/tests/e2e/kubetest2-kops/util/publicip.go +++ b/tests/e2e/pkg/util/publicip.go @@ -37,7 +37,7 @@ var externalIPServiceURLs = []string{ func ExternalIPRange() (string, error) { var b bytes.Buffer - err := httpGETWithHeaders(externalIPMetadataURL, map[string]string{"Metadata-Flavor": "Google"}, &b) + err := HTTPGETWithHeaders(externalIPMetadataURL, map[string]string{"Metadata-Flavor": "Google"}, &b) if err != nil { // This often fails due to workload identity log.Printf("failed to get external ip from metadata service: %v", err) @@ -50,7 +50,7 @@ func ExternalIPRange() (string, error) { for attempt := 0; attempt < 5; attempt++ { for _, u := range externalIPServiceURLs { b.Reset() - err = httpGETWithHeaders(u, nil, &b) + err = HTTPGETWithHeaders(u, nil, &b) if err != nil { // The external service may well be down log.Printf("failed to get external ip from %s: %v", u, err)