From 2031398156105a0cef3263ab469fd2dfd3ecaec7 Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Mon, 4 Jan 2021 20:32:16 +0100 Subject: [PATCH] fix e2e conformance test --- .../infrastructure-docker/v1alpha4/bases/cluster-with-kcp.yaml | 3 ++- test/framework/kubetest/run.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e/data/infrastructure-docker/v1alpha4/bases/cluster-with-kcp.yaml b/test/e2e/data/infrastructure-docker/v1alpha4/bases/cluster-with-kcp.yaml index c9fb94dc6f5a..a0082e45decc 100644 --- a/test/e2e/data/infrastructure-docker/v1alpha4/bases/cluster-with-kcp.yaml +++ b/test/e2e/data/infrastructure-docker/v1alpha4/bases/cluster-with-kcp.yaml @@ -61,7 +61,8 @@ spec: controllerManager: extraArgs: {enable-hostpath-provisioner: 'true'} apiServer: - certSANs: [localhost, 127.0.0.1, 0.0.0.0] + # host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied. + certSANs: [localhost, 127.0.0.1, 0.0.0.0, host.docker.internal] initConfiguration: nodeRegistration: criSocket: /var/run/containerd/containerd.sock diff --git a/test/framework/kubetest/run.go b/test/framework/kubetest/run.go index d9da62b78801..8ae6ad643ada 100644 --- a/test/framework/kubetest/run.go +++ b/test/framework/kubetest/run.go @@ -141,7 +141,8 @@ func Run(ctx context.Context, input RunInput) error { return errors.Wrap(err, "unable to determine current user") } userArg := user.Uid + ":" + user.Gid - e2eCmd := exec.Command("docker", "run", "--user", userArg, kubeConfigVolumeMount, outputVolumeMount, viperVolumeMount, "-t", input.ConformanceImage) + networkArg := "--network=kind" + e2eCmd := exec.Command("docker", "run", "--user", userArg, kubeConfigVolumeMount, outputVolumeMount, viperVolumeMount, "-t", networkArg, input.ConformanceImage) e2eCmd.Args = append(e2eCmd.Args, "/usr/local/bin/ginkgo") e2eCmd.Args = append(e2eCmd.Args, ginkgoArgs...) e2eCmd.Args = append(e2eCmd.Args, "/usr/local/bin/e2e.test")