lint fixes

This commit is contained in:
David Ames
2019-02-19 15:49:47 -08:00
parent 3280b0653a
commit 6877038f4c
2 changed files with 9 additions and 2 deletions

View File

@@ -40,6 +40,12 @@ def basic_setup(cacert=None):
vault_creds = vault_utils.init_vault(unseal_client)
vault_utils.store_credentails(vault_creds)
def auto_inititialize():
"""Auto initialize vault for testing.
In a stack that includes and relies on certificate in vault initialize
vault by unsealing and creating a certificate authority.
"""
suite = unittest.TestLoader().loadTestsFromTestCase(vault_tests.VaultTest)
test_result = unittest.TextTestRunner(verbosity=2).run(suite)
unittest.TextTestRunner(verbosity=2).run(suite)

View File

@@ -319,7 +319,8 @@ def get_keystone_session(openrc_creds, scope='PROJECT', verify=None):
if os.path.exists(tmp_file):
os.chmod(tmp_file, 0o644)
openrc_creds['OS_CACERT'] = tmp_file
keystone_creds['auth_url'] = keystone_creds['auth_url'].replace("http:", "https:")
keystone_creds['auth_url'] = (keystone_creds['auth_url']
.replace("http:", "https:"))
if not verify and openrc_creds.get('OS_CACERT'):
verify = openrc_creds['OS_CACERT']