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

chore: don't hardcode argo-e2e* namespaces #12871

Conversation

blakepettersson
Copy link
Member

There are two environment variables which are used to set namespaces other than argo-e2e and argo-e2e-external; ARGOCD_E2E_NAMESPACE and ARGOCD_E2E_APP_NAMESPACE respectively.

When using these env vars, a bunch of tests fail since a lot of them hardcode argo-e2e or argo-e2e-external. This PR changes that to use either TestNamespace() or AppNamespace(), which will set the correct namespace to use if the above env vars have been set.

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

There are two environment variables which are used to set namespaces
other than `argo-e2e` and `argo-e2e-external`; `ARGOCD_E2E_NAMESPACE`
and `ARGOCD_E2E_APP_NAMESPACE` respectively.

When using these env vars, a bunch of tests fail since a lot of them
hardcode `argo-e2e` or `argo-e2e-external`. This PR changes that to
use either `TestNamespace()` or `AppNamespace()`, which will set the
correct namespace to use if the above env vars have been set.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (f602e81) 47.77% compared to head (bf99da4) 47.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12871   +/-   ##
=======================================
  Coverage   47.77%   47.77%           
=======================================
  Files         246      246           
  Lines       42070    42070           
=======================================
  Hits        20101    20101           
  Misses      19967    19967           
  Partials     2002     2002           

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

LGTM! This is great! Thanks!

@jannfis jannfis merged commit 6050fc7 into argoproj:master Mar 15, 2023
@blakepettersson blakepettersson deleted the chore/run-e2e-tests-in-other-namespaces branch March 15, 2023 14:18
alexec pushed a commit to alexec/argo-cd that referenced this pull request Mar 19, 2023
There are two environment variables which are used to set namespaces
other than `argo-e2e` and `argo-e2e-external`; `ARGOCD_E2E_NAMESPACE`
and `ARGOCD_E2E_APP_NAMESPACE` respectively.

When using these env vars, a bunch of tests fail since a lot of them
hardcode `argo-e2e` or `argo-e2e-external`. This PR changes that to
use either `TestNamespace()` or `AppNamespace()`, which will set the
correct namespace to use if the above env vars have been set.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
There are two environment variables which are used to set namespaces
other than `argo-e2e` and `argo-e2e-external`; `ARGOCD_E2E_NAMESPACE`
and `ARGOCD_E2E_APP_NAMESPACE` respectively.

When using these env vars, a bunch of tests fail since a lot of them
hardcode `argo-e2e` or `argo-e2e-external`. This PR changes that to
use either `TestNamespace()` or `AppNamespace()`, which will set the
correct namespace to use if the above env vars have been set.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
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