2013-11-27 11:19:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2013-06-27 11:40:13 +00:00
|
|
|
# Import python libs
|
2014-11-21 19:05:13 +00:00
|
|
|
from __future__ import absolute_import
|
2013-06-25 08:24:45 +00:00
|
|
|
|
2013-06-27 11:40:13 +00:00
|
|
|
# Import Salt Testing libs
|
2017-04-03 16:04:09 +00:00
|
|
|
from tests.support.case import ModuleCase
|
2017-04-04 17:57:27 +00:00
|
|
|
from tests.support.helpers import requires_salt_modules, skip_if_not_root
|
2012-10-19 14:05:35 +00:00
|
|
|
|
|
|
|
|
2017-04-04 17:57:27 +00:00
|
|
|
@skip_if_not_root
|
2014-02-03 10:55:44 +00:00
|
|
|
@requires_salt_modules('rabbitmq')
|
2017-04-03 16:04:09 +00:00
|
|
|
class RabbitModuleTest(ModuleCase):
|
2012-10-19 14:05:35 +00:00
|
|
|
'''
|
|
|
|
Validates the rabbitmqctl functions.
|
|
|
|
To run these tests, you will need to be able to access the rabbitmqctl
|
|
|
|
commands.
|
|
|
|
'''
|
|
|
|
def test_user_exists(self):
|
|
|
|
'''
|
|
|
|
Find out whether a user exists.
|
|
|
|
'''
|
|
|
|
ret = self.run_function('rabbitmq.user_exists', ['null_user'])
|
|
|
|
self.assertEqual(ret, False)
|