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

Environment variables conflicting with unit tests #359

Open
renanmagagnin opened this issue Jan 24, 2025 · 0 comments
Open

Environment variables conflicting with unit tests #359

renanmagagnin opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@renanmagagnin
Copy link
Contributor

/kind bug

What happened?

  1. Declared the following environment variable: export AWS_REGION=example
  2. Executed the unit tests (with make test) and some tests failed.
--- FAIL: TestProvidingDriverLevelCredentialsWithEmptyEnv (0.00s)
--- FAIL: TestProvidingPodLevelCredentialsRegionPopulation (0.05s)
    --- FAIL: TestProvidingPodLevelCredentialsRegionPopulation/no_region (0.01s)
    --- FAIL: TestProvidingPodLevelCredentialsRegionPopulation/region_from_imds (0.01s)
  1. Identified that clearing the variable or running the tests in a new terminal avoids the issue

What you expected to happen?
The tests shouldn't be affected by environment variables.

How to reproduce it (as minimally and precisely as possible)?

  1. Declare the environment variable: export AWS_REGION=example
  2. Execute the unit tests: make test

Environment

  • Kubernetes version:
Client Version: v1.32.0-eks-5ca49cb
Kustomize Version: v5.5.0
Server Version: v1.30.8-eks-2d5f260
  • Driver version: 1.12.0
@renanmagagnin renanmagagnin added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant