run all modules in the modules dir

This commit is contained in:
Thomas S Hatch 2012-02-12 16:10:50 -07:00
parent fd82c47a95
commit 21cebcc091
2 changed files with 1 additions and 14 deletions

View File

@ -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()

View File

@ -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)