Merge pull request #36241 from hrumph/cert_problem

Fixes #36240
This commit is contained in:
Nicole Thomas 2016-10-12 17:28:35 -06:00 committed by GitHub
commit 3ac9ced202
2 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ def add_store(name, store, saltenv='base'):
serials = __salt__['certutil.get_stored_cert_serials'](store)
if cert_serial not in serials:
out = __salt__['certutil.add_store'](cert_file, store)
out = __salt__['certutil.add_store'](name, store)
if "successfully" in out:
ret['changes']['added'] = name
else:

View file

@ -44,7 +44,7 @@ class CertUtilTestCase(TestCase):
cache_mock.assert_called_once_with('/path/to/cert.cer', 'base')
get_cert_serial_mock.assert_called_once_with('/tmp/cert.cer')
get_store_serials_mock.assert_called_once_with('TrustedPublisher')
add_mock.assert_called_once_with('/tmp/cert.cer', 'TrustedPublisher')
add_mock.assert_called_once_with('/path/to/cert.cer', 'TrustedPublisher')
self.assertEqual(expected, out)
def test_add_serial_missing(self):
@ -122,7 +122,7 @@ class CertUtilTestCase(TestCase):
cache_mock.assert_called_once_with('/path/to/cert.cer', 'base')
get_cert_serial_mock.assert_called_once_with('/tmp/cert.cer')
get_store_serials_mock.assert_called_once_with('TrustedPublisher')
add_mock.assert_called_once_with('/tmp/cert.cer', 'TrustedPublisher')
add_mock.assert_called_once_with('/path/to/cert.cer', 'TrustedPublisher')
self.assertEqual(expected, out)
def test_del_serial(self):