Skip to content

Commit

Permalink
Merge pull request salt-formulas#61 from deepmind/tests
Browse files Browse the repository at this point in the history
Tests runner helper
  • Loading branch information
ramaro authored Apr 4, 2018
2 parents ffddc66 + 9173f92 commit 5bb52ba
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ install:

# command to run tests
script:
- python -m unittest discover
- python run_tests.py
19 changes: 19 additions & 0 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3.6
#
# Copyright 2018 The Kapitan Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import unittest

unittest.TextTestRunner(verbosity=1).run(unittest.TestLoader().discover('tests'))
2 changes: 1 addition & 1 deletion tests/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
os.chdir(os.getcwd() + '/examples/kubernetes/')

def test_compile(self):
sys.argv[1] = "compile"
sys.argv = ["kapitan", "compile"]
main()
compiled_dir_hash = get_directory_hash(os.getcwd() + '/compiled')
test_compiled_dir_hash = get_directory_hash(os.getcwd() + '/../../tests/test_kubernetes_compiled')
Expand Down

0 comments on commit 5bb52ba

Please sign in to comment.