Skip to content

Commit

Permalink
Using KinD builtin port mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviof authored and HeavyWombat committed Apr 13, 2022
1 parent ad511bb commit 7779498
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -61,5 +62,4 @@ jobs:

- name: End-to-End Tests
run: |
nohup kubectl port-forward --namespace registry deployment/registry 32222:5000 &
make test-e2e
5 changes: 2 additions & 3 deletions test/e2e/upload.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" \
Expand Down
10 changes: 10 additions & 0 deletions test/kind/config.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7779498

Please sign in to comment.