salt/tests/integration/modules/test_rabbitmq.py

27 lines
756 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
from tests.support.helpers import requires_salt_modules
2014-02-03 10:55:44 +00:00
@skipIf(os.geteuid() != 0, 'You must be root to run this test')
@requires_salt_modules('rabbitmq')
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)