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

Support namespaces in test helpers #20048

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

cipherboy
Copy link
Contributor

Sometimes the tests will modify the client to set a namespace; this results in testhelpers sometimes trying to access sys/ endpoints with a namespace, which usually don't work well.

Detect an unset namespaces, if present, before executing, and restore afterwards so as not to affect the tests.

Copy link
Contributor

@stevendpclark stevendpclark left a comment

Choose a reason for hiding this comment

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

Small nit but lgtm.

helper/testhelpers/testhelpers.go Outdated Show resolved Hide resolved
@cipherboy cipherboy force-pushed the cipherboy-support-namespaces-testhelpers branch from 5a60242 to cf8d74a Compare April 11, 2023 13:32
@cipherboy cipherboy enabled auto-merge (squash) April 11, 2023 13:33
Sometimes the tests will modify the client to set a namespace; this
results in testhelpers sometimes trying to access sys/ endpoints with a
namespace, which usually don't work well.

Detect an unset namespaces, if present, before executing, and restore
afterwards so as not to affect the tests.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
@cipherboy cipherboy force-pushed the cipherboy-support-namespaces-testhelpers branch from cf8d74a to 4af9ca0 Compare April 11, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants