mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
run all modules in the modules dir
This commit is contained in:
parent
fd82c47a95
commit
21cebcc091
@ -1,13 +0,0 @@
|
||||
from salt.cli.caller import Caller
|
||||
from salt.config import minion_config
|
||||
|
||||
defaults = {
|
||||
'module_dirs': '',
|
||||
'log_level': 'warning',
|
||||
}
|
||||
config = minion_config('/etc/salt/minion')
|
||||
|
||||
def run_module(name, *args):
|
||||
opts = defaults.copy()
|
||||
opts.update(config, fun=name, arg=args)
|
||||
return Caller(opts).call()
|
@ -12,7 +12,7 @@ TEST_DIR = os.path.dirname(os.path.normpath(os.path.abspath(__file__)))
|
||||
def main():
|
||||
saltunittest.TestDaemon()
|
||||
loader = saltunittest.TestLoader()
|
||||
tests = loader.discover(os.path.join(TEST_DIR, 'modules'))
|
||||
tests = loader.discover(os.path.join(TEST_DIR, 'modules'), '*.py')
|
||||
saltunittest.TextTestRunner(verbosity=1).run(tests)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user