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
|
2012-10-19 14:05:35 +00:00
|
|
|
import os
|
2013-06-25 08:24:45 +00:00
|
|
|
|
2013-06-27 11:40:13 +00:00
|
|
|
# Import Salt Testing libs
|
2017-02-27 15:59:04 +00:00
|
|
|
import tests.integration as integration
|
2017-02-27 13:58:07 +00:00
|
|
|
from tests.support.unit import skipIf
|
2017-02-27 15:59:04 +00:00
|
|
|
from tests.support.helpers import requires_salt_modules
|
2012-10-19 14:05:35 +00:00
|
|
|
|
|
|
|
|
2014-02-03 10:55:44 +00:00
|
|
|
@skipIf(os.geteuid() != 0, 'You must be root to run this test')
|
|
|
|
@requires_salt_modules('rabbitmq')
|
2012-10-19 14:05:35 +00:00
|
|
|
class RabbitModuleTest(integration.ModuleCase):
|
|
|
|
'''
|
|
|
|
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)
|