1
0

test_executor.py 821 B

123456789101112131415161718192021222324252627282930
  1. # Import python libs
  2. import logging
  3. # Import Salt Testing libs
  4. from tests.support.case import ModuleCase, ShellCase
  5. from tests.support.helpers import slowTest
  6. log = logging.getLogger(__name__)
  7. class ExecutorTest(ModuleCase, ShellCase):
  8. def setup(self):
  9. self.run_function("saltutil.sync_all")
  10. @slowTest
  11. def test_executor(self):
  12. """
  13. test that dunders are set
  14. """
  15. data = self.run_call("test.arg --module-executors=arg")
  16. self.assertIn("test.arg fired", "".join(data))
  17. @slowTest
  18. def test_executor_with_multijob(self):
  19. """
  20. test that executor is fired when sending a multifunction job
  21. """
  22. data = self.run_salt("'*' test.arg,test.arg foo,bar --module-executors=arg")
  23. self.assertIn("test.arg fired", "".join(data))