Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[2018.3] Fix to utils/vault.py #50090
What does this PR do?
Due to a previous PR the test_sdb_runner in sdb.test_vault from the Fluorine branch was failing because of a exception that was being swallowed in the test run_run function.
The cause was that when vault related functions were being run, if they were being run on the master then they were being forced to run through the _get_token_and_url_from_master() function, which is pull the id element out of the grains dictionary.
When the call was taking place from a runner, the exception was popping up since there is no id when called from a runner. This fix checks to see if the id exists in the dictionary first, if it is there then _get_token_and_url_from_master() is called, otherwise _use_local_config is called.
What issues does this PR fix or reference?
No. Verified that sdb tests from Fluorine pass as well as manual tests from previous PRs work as expected.
Commits signed with GPG?
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.