diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d5d06f00..233e52bd 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -149,6 +149,7 @@ jobs: kubectl get cachedimages echo "kubectl get repository" kubectl get repository + ## Check if our test image is cached if [ $(kubectl get cachedimages docker.io-library-nginx-stable-alpine -o json | jq ".status.isCached") ]; then if [ $(kubectl get cachedimages docker.io-library-nginx-stable-alpine -o json | jq ".status.usedBy.count") -eq 2 ]; @@ -162,6 +163,15 @@ jobs: echo "Error: image cached status is false" exit 1 fi + ## Check repository status + if [ $(kubectl get repository docker.io-library-nginx -o json | jq ".status.phase") == "Ready" ]; + then + echo "Found repository" + else + echo "Error: image repository status is not Ready" + exit 1 + fi + ## Check for kuik's components metrics for component in proxy controllers do echo "Testing $component metrics endpoint" @@ -279,6 +289,7 @@ jobs: kubectl get cachedimages echo "kubectl get repository" kubectl get repository + ## Check if our test image is cached if [ $(kubectl get cachedimages docker.io-library-nginx-stable-alpine -o json | jq ".status.isCached") ]; then if [ $(kubectl get cachedimages docker.io-library-nginx-stable-alpine -o json | jq ".status.usedBy.count") -eq 2 ]; @@ -292,6 +303,15 @@ jobs: echo "Error: image cached status is false" exit 1 fi + ## Check repository status + if [ $(kubectl get repository docker.io-library-nginx -o json | jq ".status.phase") == "Ready" ]; + then + echo "Found repository" + else + echo "Error: image repository status is not Ready" + exit 1 + fi + ## Check for kuik's components metrics for component in proxy controllers do echo "Testing $component metrics endpoint"