Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e test suite #53

Merged
merged 3 commits into from
Mar 11, 2024
Merged

Add e2e test suite #53

merged 3 commits into from
Mar 11, 2024

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented Mar 8, 2024

Update local-setup

Update local-setup so it can be used for both an e2e test suite and local development setup. Adds commands to generate AWS and GCP dns provider configuration and credentials used by local-setup:

make local-setup-aws-mz-clean local-setup-aws-mz-generate AWS_ZONE_ROOT_DOMAIN=<my domain> AWS_DNS_PUBLIC_ZONE_ID=<my zone id> AWS_ACCESS_KEY_ID=<my access key> AWS_SECRET_ACCESS_KEY=<my access secret>
make local-setup-gcp-mz-clean local-setup-gcp-mz-generate GCP_ZONE_NAME=<my zone name> GCP_ZONE_DNS_NAME=<my domain>GCP_GOOGLE_CREDENTIALS='<my google credentials>'

make local-setup will generate a ManagedZone for AWS and/or GCP depending on the correct configuration existing (Generated by the above commands).

Add e2e test suite and GH Workflow
Adds a new e2e test suite based on the MGC repo test suite with basic single cluster test for "simple" and "loadbalanced" type records. Adds a new make target make test-e2e to execute the test suite using AWS or GCP providers:

make test-e2e TEST_DNS_MANAGED_ZONE_NAME=dev-mz-aws TEST_DNS_ZONE_DOMAIN_NAME=mn.hcpapps.net TEST_DNS_NAMESPACE=dnstest TEST_DNS_PROVIDER=aws
make test-e2e TEST_DNS_MANAGED_ZONE_NAME=dev-mz-gcp TEST_DNS_ZONE_DOMAIN_NAME=mn.google.hcpapps.net TEST_DNS_NAMESPACE=dnstest TEST_DNS_PROVIDER=gcp

Workflow tested here https://github.com/Kuadrant/dns-operator/actions/runs/8230763432/job/22504686996?pr=53

closes #51

@mikenairn mikenairn force-pushed the add_e2e_test_suite branch 5 times, most recently from 2bd3dbc to 3a34691 Compare March 10, 2024 14:06
@mikenairn mikenairn marked this pull request as ready for review March 10, 2024 14:22
@mikenairn mikenairn force-pushed the add_e2e_test_suite branch from 3a34691 to 6d3739e Compare March 11, 2024 08:22
@mikenairn mikenairn changed the title WIP Add e2e test suite Add e2e test suite Mar 11, 2024
@mikenairn mikenairn force-pushed the add_e2e_test_suite branch from 6d3739e to 52df1d8 Compare March 11, 2024 09:40
@mikenairn mikenairn changed the title Add e2e test suite WIP Add e2e test suite Mar 11, 2024
@mikenairn mikenairn force-pushed the add_e2e_test_suite branch 2 times, most recently from 0c51005 to fff0e4f Compare March 11, 2024 09:55
@mikenairn mikenairn changed the title WIP Add e2e test suite Add e2e test suite Mar 11, 2024
Copy link
Collaborator

@philbrookes philbrookes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Update local-setup so it can be used for both an e2e test suite and
local development setup.

Adds commands to generate AWS and GCP dns provider configuration and
credentials used by local-setup
```
make local-setup-aws-mz-clean local-setup-aws-mz-generate AWS_ZONE_ROOT_DOMAIN=<my domain> AWS_DNS_PUBLIC_ZONE_ID=<my zone id> AWS_ACCESS_KEY_ID=<my access key> AWS_SECRET_ACCESS_KEY=<my access secret>
make local-setup-gcp-mz-clean local-setup-gcp-mz-generate GCP_ZONE_NAME=<my zone name> GCP_ZONE_DNS_NAME=<my domain>GCP_GOOGLE='<my google credentials>'
```

`make local-setup` will generate a ManagedZone for AWS and/or GCP
depending on the correct configuration existing (Generated by the above
commands).

Update README
Adds a new e2e test suite based on the MGC repo test suite with basic
single cluster test for "simple" and "loadbalanced" type records.

Adds a new make target `make test-e2e` to execute the test suite using
AWS or GCP providers:

```
make test-e2e TEST_DNS_MANAGED_ZONE_NAME=dev-mz-aws TEST_DNS_ZONE_DOMAIN_NAME=mn.hcpapps.net TEST_DNS_NAMESPACE=dnstest TEST_DNS_PROVIDER=aws
make test-e2e TEST_DNS_MANAGED_ZONE_NAME=dev-mz-gcp TEST_DNS_ZONE_DOMAIN_NAME=mn.google.hcpapps.net TEST_DNS_NAMESPACE=dnstest TEST_DNS_PROVIDER=gcp
```
@mikenairn mikenairn force-pushed the add_e2e_test_suite branch from fff0e4f to 7beee86 Compare March 11, 2024 13:40
@mikenairn mikenairn merged commit 41d07c2 into main Mar 11, 2024
8 checks passed
@mikenairn mikenairn deleted the add_e2e_test_suite branch March 11, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add basic e2e test suite and GitHub Workflow
2 participants