-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow users to pass credentials through environment variables (#2178)
* Add failing test Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Add in-place environment variable resolution Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Add test to ensure oc.env resolver is cleared after reading credentials Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Refactor docstring on _resolve_environment_variables Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Move credentials.yml creation to fixture Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Modify _resolve_environment_variables to only clear the oc.env resolver if it was not registered Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Move environment variable resolution to load_and_merge_dir_config Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Add read_environment_variables to load_and_merge_dir_config docstring Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Add test for env resolver not being used when config key is not 'credentials' Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Lint Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Add release note Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Refactor _resolve_environment_variables to remove unnecessary logic control flow variable Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Add test_env_resolver_is_registered_after_loading Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> * Fix test_env_resolver_is_registered_after_loading Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com> Signed-off-by: Jannic Holzer <jannic.holzer@quantumblack.com>
- Loading branch information
Showing
3 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters