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 test for ingress iap. #175

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

sawsa307
Copy link
Contributor

  • Add test for ingress iap.
  • In the test, OAuth credential will be genereated and used in kubectl secret.
  • User needs to have a valid domain name and specify DNS record as environment variable. A valid support email is also needed if OAuth Brand doesn't exist in the running project.

@sawsa307 sawsa307 force-pushed the ingress-iap-test branch 3 times, most recently from e2e11e6 to d88ba47 Compare October 24, 2023 20:20
@sawsa307 sawsa307 marked this pull request as draft October 26, 2023 01:06
@sawsa307 sawsa307 marked this pull request as ready for review October 26, 2023 17:02
* Add test for ingress iap.
* In the test, OAuth credential will be genereated and used in kubectl
  secret.
* User needs to have a valid domain name and specify DNS record as
  environment variable. A valid support email is also needed if OAuth
  Brand doesn't exist in the running project.

resource_yaml="ingress/single-cluster/ingress-iap/iap-ingress.yaml"
kubectl --context "${context}" delete -f "${resource_yaml}" -n "${test_name}" || true
sed -i'.bak' "s/${iap_dns_record}/\$DOMAIN/g" "${resource_yaml}"
Copy link
Member

Choose a reason for hiding this comment

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

you can fix this in a follow on commit, but we should try to not modify inside the original source director.

ideally you put the temp files in a directory returned by mktemp -d and delete the temporary directory with an EXIT trap

@bowei bowei merged commit 0d5eb0b into GoogleCloudPlatform:main Oct 30, 2023
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.

2 participants