-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: rewrite test suite with ginkgo
- Loading branch information
1 parent
27b41c1
commit 3a860e1
Showing
38 changed files
with
922 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,24 +18,24 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
kindest_node_version: [v1.25.16, v1.26.15] | ||
harbor: ["1.9.0","1.14.0"] | ||
harbor: ["1.9.0","1.14.3"] | ||
lagoon_build_image: ["uselagoon/build-deploy-image:main"] | ||
experimental: [false] | ||
include: | ||
- kindest_node_version: v1.27.13 | ||
harbor: "1.14.0" | ||
harbor: "1.14.3" | ||
lagoon_build_image: "uselagoon/build-deploy-image:main" | ||
experimental: false | ||
- kindest_node_version: v1.28.9 | ||
harbor: "1.14.0" | ||
harbor: "1.14.3" | ||
lagoon_build_image: "uselagoon/build-deploy-image:main" | ||
experimental: false | ||
- kindest_node_version: v1.29.4 | ||
harbor: "1.14.0" | ||
harbor: "1.14.3" | ||
lagoon_build_image: "uselagoon/build-deploy-image:main" | ||
experimental: true | ||
- kindest_node_version: v1.30.2 | ||
harbor: "1.14.0" | ||
harbor: "1.14.3" | ||
lagoon_build_image: "uselagoon/build-deploy-image:main" | ||
experimental: true | ||
steps: | ||
|
@@ -79,6 +79,8 @@ jobs: | |
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx | ||
helm repo add harbor https://helm.goharbor.io | ||
helm repo add lagoon https://uselagoon.github.io/lagoon-charts/ | ||
helm repo add metallb https://metallb.github.io/metallb | ||
helm repo add jetstack https://charts.jetstack.io | ||
- name: Install gojq | ||
if: | | ||
|
@@ -92,23 +94,24 @@ jobs: | |
- name: Configure node IP in kind-config.yaml | ||
run: | | ||
docker network create kind | ||
export KIND_NODE_IP=$(docker run --network kind --rm alpine ip -o addr show eth0 | sed -nE 's/.* ([0-9.]{7,})\/.*/\1/p') | ||
envsubst < test-resources/kind-config.yaml.tpl > test-resources/kind-config.yaml | ||
cat test-resources/kind-config.yaml | ||
docker network create remote-controller | ||
export KIND_NODE_IP=$(docker run --network remote-controller --rm alpine ip -o addr show eth0 | sed -nE 's/.* ([0-9.]{7,})\/.*/\1/p') | ||
envsubst < test-resources/test-suite.kind-config.yaml.tpl > test-resources/test-suite.kind-config.yaml | ||
cat test-resources/test-suite.kind-config.yaml | ||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
with: | ||
version: v0.14.0 | ||
node_image: kindest/node:${{ matrix.kindest_node_version }} | ||
config: test-resources/kind-config.yaml | ||
config: test-resources/test-suite.kind-config.yaml | ||
|
||
- name: Check node IP matches kind configuration | ||
run: | | ||
NODE_IP="$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}')" | ||
LAGOON_KIND_CIDR_BLOCK=$(docker network inspect remote-controller | jq '. [0].IPAM.Config[0].Subnet' | tr -d '"') | ||
NODE_IP=$(echo ${LAGOON_KIND_CIDR_BLOCK%???} | awk -F'.' '{print $1,$2,$3,240}' OFS='.') | ||
echo Checking for NODE_IP "$NODE_IP" | ||
grep $NODE_IP test-resources/kind-config.yaml | ||
grep $NODE_IP test-resources/test-suite.kind-config.yaml | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
@@ -120,17 +123,6 @@ jobs: | |
load: true | ||
tags: uselagoon/remote-controller:test-tag | ||
|
||
- name: Install prerequisites | ||
run: make -j8 -O install-lagoon-remote HARBOR_VERSION=${{matrix.harbor}} | ||
|
||
- name: Run Tests | ||
- name: Run github/test-e2e | ||
run: | | ||
export PATH=$PATH:/usr/local/kubebuilder/bin | ||
export PATH=$PATH:/usr/local/go/bin | ||
export OVERRIDE_BUILD_DEPLOY_DIND_IMAGE="${{matrix.lagoon_build_image}}" | ||
export HARBOR_URL="http://harbor.$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080" | ||
export HARBOR_API="http://harbor.$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/api" | ||
export KIND_NODE_IP="$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}')" | ||
export HARBOR_VERSION=${{matrix.harbor}} | ||
# export GO111MODULE=on | ||
make controller-test | ||
make github/test-e2e HARBOR_VERSION=${{matrix.harbor}} OVERRIDE_BUILD_DEPLOY_DIND_IMAGE="${{matrix.lagoon_build_image}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ bin | |
*.swp | ||
*.swo | ||
*~ | ||
|
||
test-resources/test-suite.kind-config.yaml | ||
test-resources/test-suite.metallb-pool.yaml |
Oops, something went wrong.