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 cleanup script #383

Merged
merged 2 commits into from
Sep 12, 2023
Merged

add e2e cleanup script #383

merged 2 commits into from
Sep 12, 2023

Conversation

mikhail-aws
Copy link
Contributor

@mikhail-aws mikhail-aws commented Sep 3, 2023

Note:

  • Change e2e tests namespace from "non-default" to "e2e-test"
  • Create e2e-test namespace if does not exists in Makefile
  • Add cleanup script in Makefile. Namespace deletion and creation is an ultimate cleaner, no need to track resources individually.

Tested with running, terminating, cleaning, and running again e2e-tests.

Closes #293
Closes #231

kubectl get serviceimports -n $n -l 'testing.kubernetes.io in (true)' | grep -v NAME | awk '{print $1}' | xargs kubectl delete serviceimport -n $n
kubectl get httproutes -n $n -l 'testing.kubernetes.io in (true)' | grep -v NAME | awk '{print $1}' | xargs kubectl delete httproute -n $n
kubectl get gateway -n $n -l 'testing.kubernetes.io in (true)' | grep -v NAME | awk '{print $1}' | xargs kubectl delete gateway -n $n
done
Copy link
Contributor

@zijun726911 zijun726911 Sep 5, 2023

Choose a reason for hiding this comment

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

Do you need to clean service, deployment and grpcroutes and targetGroupPolicy?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@coveralls
Copy link

coveralls commented Sep 12, 2023

Pull Request Test Coverage Report for Build 6153768735

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 39.061%

Totals Coverage Status
Change from base Build 6151588855: 0.0%
Covered Lines: 4008
Relevant Lines: 10261

💛 - Coveralls

Copy link
Contributor

@zijun726911 zijun726911 left a comment

Choose a reason for hiding this comment

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

LGTM, if you change ns here to k8snamespace as well, can it further help to avoid e2e test suite create resource in default ns?

@mikhail-aws
Copy link
Contributor Author

@zijun726911 changed default to e2e-tests. To use k8snamespace variable need to move it into different package. That will be too many changes for this PR, so I opted into hard coded value.

Copy link
Contributor

@erikfuller erikfuller left a comment

Choose a reason for hiding this comment

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

lgtm. thanks for putting this together!

@mikhail-aws mikhail-aws merged commit a277fb3 into aws:main Sep 12, 2023
5 checks passed
@mikhail-aws mikhail-aws deleted the e2e-cleanup branch September 12, 2023 19:19
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.

Improve get started docs with cleanup steps [e2e test]. Need to automate creating "non-default" namespace
5 participants