From 760d06e82d22269da7224003c326dfd66e5a5842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Jure=C4=8Dko?= Date: Fri, 21 Jun 2024 10:53:37 +0200 Subject: [PATCH] tests: Improve CI tests, don't skip minikube load balancer --- .github/workflows/test-k8s-service-stream.yml | 9 +++++---- provisioning/stream/local.sh | 8 ++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-k8s-service-stream.yml b/.github/workflows/test-k8s-service-stream.yml index 8a8df3c0fa..e34f566f86 100644 --- a/.github/workflows/test-k8s-service-stream.yml +++ b/.github/workflows/test-k8s-service-stream.yml @@ -205,14 +205,15 @@ jobs: - name: Check API response if: always() run: | - kubectl port-forward --address 0.0.0.0 --namespace $KUBERNETES_NAMESPACE service/stream-api 30001:80 & - curl --fail -s --max-time 5 --retry 5 --retry-connrefused "localhost:30001/health-check" + hostPort=$(minikube service --url stream-api --namespace $KUBERNETES_NAMESPACE) + echo "$hostPort" + curl --fail -s --max-time 5 --retry 5 --retry-connrefused "$hostPort/health-check" - name: Check HTTP source response if: always() run: | - kubectl port-forward --address 0.0.0.0 --namespace $KUBERNETES_NAMESPACE service/stream-http-source 30002:80 & - curl --fail -s --max-time 5 --retry 5 --retry-connrefused "localhost:30002/health-check" + hostPort=$(minikube service --url stream-http-source --namespace $KUBERNETES_NAMESPACE) + curl --fail -s --max-time 5 --retry 5 --retry-connrefused "$hostPort/health-check" - name: Test etcd defragmentation cron job if: always() diff --git a/provisioning/stream/local.sh b/provisioning/stream/local.sh index 8c08de479b..e014ed2c05 100644 --- a/provisioning/stream/local.sh +++ b/provisioning/stream/local.sh @@ -77,5 +77,9 @@ echo "To clear the MiniKube:" echo "MINIKUBE_PROFILE=${MINIKUBE_PROFILE} minikube delete --purge" echo echo "Run port-forwarding to access services:" -echo "API: kubectl port-forward --address 0.0.0.0 --namespace $NAMESPACE service/stream-api :80" -echo "HTTP source: kubectl port-forward --address 0.0.0.0 --namespace $NAMESPACE service/stream-http-source :80" +echo "API:" +echo " kubectl port-forward --address 0.0.0.0 --namespace $NAMESPACE service/stream-api :80" +echo " OR " +echo "HTTP source:" +echo " kubectl port-forward --address 0.0.0.0 --namespace $NAMESPACE service/stream-http-source :80" +echo " OR "