Skip to content

Commit edc31ce

Browse files
authored
Merge pull request #37 from olehermanse/testing
Small improvements to bash test scripts
2 parents fe37068 + 11d0486 commit edc31ce

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

tests/run-format-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ echo "TODO: Uncomment set -e to make tests start failing"
88
echo "These tests expect cfengine CLI to be installed globally or in venv"
99

1010
echo "Looking for CFEngine CLI:"
11-
which cfengine
11+
cfengine --version
1212

1313
echo "Check that input and expected files exist:"
1414
ls -al tests/format/*.input.cf
1515
ls -al tests/format/*.expected.cf
1616

17+
rm -rf tmp
1718
mkdir -p tmp
1819

1920
echo "Check that input files match expected files:"

tests/run-lint-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ set -e
66
echo "These tests expect cfengine CLI to be installed globally or in venv"
77

88
echo "Looking for CFEngine CLI:"
9-
which cfengine
9+
cfengine --version
1010

1111
echo "Check that test files are in expected location:"
1212
ls -al tests/lint/*.cf
1313

14+
rm -rf tmp
1415
mkdir -p tmp
1516

1617
echo "Run lint tests:"

tests/run-shell-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ set -e
66
echo "These tests expect cfengine CLI to be installed globally or in venv"
77

88
echo "Looking for CFEngine CLI:"
9-
which cfengine
9+
cfengine --version
1010

1111
echo "Check that test files are in expected location:"
1212
ls -al tests/shell/*.sh
1313
ls -al tests/shell/00*.sh
1414

15+
rm -rf tmp
1516
mkdir -p tmp
1617

1718
echo "Run shell tests:"

0 commit comments

Comments
 (0)