Add auth test for minion publish

This commit is contained in:
Thomas S Hatch 2012-03-28 18:47:10 -06:00
parent 62b709d578
commit 7221d566e5
2 changed files with 15 additions and 1 deletions

View File

@ -10,4 +10,4 @@ sock_dir: .salt-unix
open_mode: True
peer:
'.*':
- '.*'
- 'test.*'

View File

@ -25,3 +25,17 @@ class PublishModuleTest(integration.ModuleCase):
]
)
self.assertEqual(ret['minion']['ret'][0][-1], 34)
def test_reject_minion(self):
'''
Test bad authentication
'''
ret = self.run_function(
'publish.publish',
[
'minion',
'cmd.run',
['echo foo']
]
)
self.assertEqual(ret, {})