Exemple #1
0
 def test_file_positive(self):
     self.collection.register(UseCommandInsteadOfShellRule())
     success = 'test/command-instead-of-shell-success.yml'
     good_runner = ansiblelint.Runner(self.collection, success, [], [], [])
     self.assertEqual([], good_runner.run())
Exemple #2
0
 def setUp(self):
     self.collection.register(UseCommandInsteadOfShellRule())
Exemple #3
0
 def test_file_negative(self):
     self.collection.register(UseCommandInsteadOfShellRule())
     failure = 'test/command-instead-of-shell-failure.yml'
     bad_runner = ansiblelint.Runner(self.collection, failure, [], [], [])
     errs = bad_runner.run()
     self.assertEqual(2, len(errs))