Add debug logging to troubleshoot test failures

This adds logging to troubleshoot https://github.com/saltstack/salt-jenkins/issues/477
This commit is contained in:
Erik Johnson 2017-08-14 16:25:13 -05:00
parent d2b6ce327a
commit 8165f46165

View file

@ -6,6 +6,7 @@
# Import python libs
from __future__ import absolute_import
import logging
import pwd
import grp
import random
@ -21,6 +22,8 @@ from salt.utils.pycrypto import gen_hash
# Import 3rd-party libs
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
log = logging.getLogger(__name__)
def gen_password():
'''
@ -99,6 +102,7 @@ class AuthTest(ShellCase):
cmd = ('-a pam "*" test.ping '
'--username {0} --password {1}'.format(self.userA, password))
resp = self.run_salt(cmd)
log.debug('resp = %s', resp)
self.assertTrue(
'minion:' in resp
)