Adding passing windows nacl runner tests to whitelist

This commit is contained in:
Daniel A Wozniak 2018-09-11 22:40:06 +00:00 committed by Daniel A. Wozniak
parent 8b971e5e5a
commit 51500ac701
No known key found for this signature in database
GPG Key ID: 166B9D2C06C82D61
3 changed files with 4 additions and 3 deletions

View File

@ -175,7 +175,7 @@ def _get_sk(**kwargs):
sk_file = config['sk_file'] sk_file = config['sk_file']
if not key and sk_file: if not key and sk_file:
with salt.utils.files.fopen(sk_file, 'rb') as keyf: with salt.utils.files.fopen(sk_file, 'rb') as keyf:
key = six.text_type(keyf.read()).rstrip('\n') key = salt.utils.stringutils.to_unicode(keyf.read()).strip('\n')
if key is None: if key is None:
raise Exception('no key or sk_file found') raise Exception('no key or sk_file found')
return base64.b64decode(key) return base64.b64decode(key)
@ -193,7 +193,7 @@ def _get_pk(**kwargs):
pubkey = six.text_type(keyf.read()).rstrip('\n') pubkey = six.text_type(keyf.read()).rstrip('\n')
if pubkey is None: if pubkey is None:
raise Exception('no pubkey or pk_file found') raise Exception('no pubkey or pk_file found')
pubkey = six.text_type(pubkey) pubkey = salt.utils.stringutils.to_str(pubkey)
return base64.b64decode(pubkey) return base64.b64decode(pubkey)

View File

@ -69,7 +69,7 @@ class NaclTest(ShellCase):
pk = ret['return']['pk'] pk = ret['return']['pk']
sk = ret['return']['sk'] sk = ret['return']['sk']
unencrypted_data = 'hello' unencrypted_data = b'hello'
# Encrypt with pk # Encrypt with pk
ret = self.run_run_plus( ret = self.run_run_plus(

View File

@ -47,6 +47,7 @@ integration.renderers.test_pydsl
integration.returners.test_librato_return integration.returners.test_librato_return
integration.runners.test_fileserver integration.runners.test_fileserver
integration.runners.test_jobs integration.runners.test_jobs
integration.runners.test_nacl
integration.runners.test_salt integration.runners.test_salt
integration.sdb.test_env integration.sdb.test_env
integration.states.test_host integration.states.test_host