From 777949894849dcd231eea769b6dca150c9c87634 Mon Sep 17 00:00:00 2001 From: Otavio Fernandes Date: Wed, 6 Apr 2022 09:12:16 +0200 Subject: [PATCH] Using KinD builtin port mapping --- .github/workflows/e2e.yaml | 2 +- test/e2e/upload.bats | 5 ++--- test/kind/config.yaml | 10 ++++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 test/kind/config.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 75fe2f6bc..2c1e3fced 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -42,6 +42,7 @@ jobs: version: v0.11.1 node_image: kindest/node:${{ matrix.kubernetes }} cluster_name: kind + config: test/kind/config.yaml wait: 120s - name: Verify KinD cluster @@ -61,5 +62,4 @@ jobs: - name: End-to-End Tests run: | - nohup kubectl port-forward --namespace registry deployment/registry 32222:5000 & make test-e2e diff --git a/test/e2e/upload.bats b/test/e2e/upload.bats index 25db1e369..4652c2bf3 100644 --- a/test/e2e/upload.bats +++ b/test/e2e/upload.bats @@ -52,7 +52,7 @@ function assert_shp_upload_follow_output() { # # Test Cases # - + run shp build upload ${build_name} "${repo_dir}" assert_success assert_shp_upload_output @@ -92,8 +92,7 @@ function assert_shp_upload_follow_output() { # local source copy approach. # # Note: This will only work if the registry used for the source bundle image is reachable - # from the local shp client. In case of the KinD based registry, this will only work if there - # is an entry in the /etc/hosts to resove the cluster local address into localhost. + # from the local shp client. # run shp build create ${build_name} \ --source-bundle-image="$(get_output_image source-bundle):latest" \ diff --git a/test/kind/config.yaml b/test/kind/config.yaml new file mode 100644 index 000000000..75977411b --- /dev/null +++ b/test/kind/config.yaml @@ -0,0 +1,10 @@ +--- +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + extraPortMappings: + - containerPort: 32222 + hostPort: 32222 + listenAddress: "0.0.0.0" + protocol: TCP \ No newline at end of file