Fix k8s credentials that use a custom ca cert

This commit is contained in:
Shane McDonald
2021-03-29 17:33:40 -04:00
parent 03ab9f4e2a
commit 4beeeae9f1
2 changed files with 3 additions and 2 deletions

View File

@@ -1003,7 +1003,8 @@ class TestJobCredentials(TestJobExecution):
if verify:
assert env['K8S_AUTH_VERIFY_SSL'] == 'True'
cert = open(env['K8S_AUTH_SSL_CA_CERT'], 'r').read()
local_path = os.path.join(private_data_dir, os.path.basename(env['K8S_AUTH_SSL_CA_CERT']))
cert = open(local_path, 'r').read()
assert cert == 'CERTDATA'
else:
assert env['K8S_AUTH_VERIFY_SSL'] == 'False'