mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
3beb3fb801
Let's drop the salttesting dependency cycle.
36 lines
902 B
Python
36 lines
902 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Import python libs
|
|
from __future__ import absolute_import
|
|
import os
|
|
|
|
# Import Salt Testing libs
|
|
from tests.support.unit import skipIf
|
|
from tests.support.helpers import ensure_in_syspath, requires_salt_modules
|
|
|
|
ensure_in_syspath('../../')
|
|
|
|
# Import salt libs
|
|
import integration
|
|
|
|
|
|
@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)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
from integration import run_tests
|
|
run_tests(RabbitModuleTest)
|