-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from Kuadrant/add_e2e_test_suite
Add e2e test suite
- Loading branch information
Showing
14 changed files
with
579 additions
and
50 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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CI-E2E | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "release-*" | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
paths-ignore: | ||
- '**.adoc' | ||
- '**.md' | ||
- 'samples/**' | ||
- 'LICENSE' | ||
pull_request_target: | ||
branches: | ||
- main | ||
- "release-*" | ||
paths-ignore: | ||
- '**.adoc' | ||
- '**.md' | ||
- 'samples/**' | ||
- 'LICENSE' | ||
workflow_dispatch: | ||
|
||
env: | ||
TEST_NAMESPACE: e2e-test | ||
|
||
jobs: | ||
e2e_test_suite: | ||
name: E2E Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: v1.21.x | ||
cache: false | ||
- name: Create AWS provider configuration | ||
run: | | ||
make local-setup-aws-mz-clean local-setup-aws-mz-generate AWS_ZONE_ROOT_DOMAIN=e2e.hcpapps.net AWS_DNS_PUBLIC_ZONE_ID=Z086929132US3PB46EOLR AWS_ACCESS_KEY_ID=${{ secrets.E2E_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }} | ||
- name: Create GCP provider configuration | ||
run: | | ||
make local-setup-gcp-mz-clean local-setup-gcp-mz-generate GCP_ZONE_NAME=e2e-google-hcpapps-net GCP_ZONE_DNS_NAME=e2e.google.hcpapps.net GCP_GOOGLE_CREDENTIALS='${{ secrets.E2E_GCP_GOOGLE_CREDENTIALS }}' GCP_PROJECT_ID=${{ secrets.E2E_GCP_PROJECT_ID }} | ||
- name: Setup environment | ||
run: | | ||
make local-setup DEPLOY=true TEST_NAMESPACE=${{ env.TEST_NAMESPACE }} | ||
kubectl -n ${{ env.TEST_NAMESPACE }} wait --timeout=60s --for=condition=Ready managedzone/dev-mz-aws | ||
kubectl -n ${{ env.TEST_NAMESPACE }} wait --timeout=60s --for=condition=Ready managedzone/dev-mz-gcp | ||
- name: Run suite AWS | ||
run: | | ||
export TEST_DNS_MANAGED_ZONE_NAME=dev-mz-aws | ||
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.hcpapps.net | ||
export TEST_DNS_NAMESPACE=${{ env.TEST_NAMESPACE }} | ||
export TEST_DNS_PROVIDER=aws | ||
make test-e2e | ||
- name: Run suite GCP | ||
run: | | ||
export TEST_DNS_MANAGED_ZONE_NAME=dev-mz-gcp | ||
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.google.hcpapps.net | ||
export TEST_DNS_NAMESPACE=${{ env.TEST_NAMESPACE }} | ||
export TEST_DNS_PROVIDER=gcp | ||
make test-e2e | ||
- name: Dump Controller logs | ||
if: ${{ failure() }} | ||
run: | | ||
kubectl get deployments -A | ||
kubectl logs --all-containers --ignore-errors deployments/dns-operator-controller-manager -n dns-operator-system |
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
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
3 changes: 3 additions & 0 deletions
3
config/local-setup/managedzone/aws/aws-credentials.env.template
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} | ||
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} | ||
AWS_REGION=${AWS_REGION} |
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
2 changes: 2 additions & 0 deletions
2
config/local-setup/managedzone/aws/managed-zone-config.env.template
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
AWS_DNS_PUBLIC_ZONE_ID=${AWS_DNS_PUBLIC_ZONE_ID} | ||
AWS_ZONE_ROOT_DOMAIN=${AWS_ZONE_ROOT_DOMAIN} |
2 changes: 2 additions & 0 deletions
2
config/local-setup/managedzone/gcp/gcp-credentials.env.template
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GOOGLE=${GCP_GOOGLE_CREDENTIALS} | ||
PROJECT_ID=${GCP_PROJECT_ID} |
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
2 changes: 2 additions & 0 deletions
2
config/local-setup/managedzone/gcp/managed-zone-config.env.template
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GCP_ZONE_NAME=${GCP_ZONE_NAME} | ||
GCP_ZONE_DNS_NAME=${GCP_ZONE_DNS_NAME} |
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
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
Oops, something went wrong.