Skip to content

Commit 8173590

Browse files
committed
Adjusted linting tests to use similar file name conventions as format tests
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 895190d commit 8173590

9 files changed

Lines changed: 3 additions & 2 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ __pycache__
1111
/tmp/
1212
*.log
1313
*.output.cf
14+
*.output.txt
1415
git_diff_exists
1516
commit_message.txt
1617
black_output.txt
File renamed without changes.
File renamed without changes.

tests/run-lint-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ for file in tests/lint/*.cf; do
2121
# - Fail (non-zero exit code)
2222
# - Output the correct error message
2323

24-
expected="$(echo $file | sed 's/\.x\.cf$/.output.txt/')"
24+
expected="$(echo $file | sed 's/\.x\.cf$/.expected.txt/')"
2525
if [ ! -f "$expected" ]; then
2626
echo "FAIL: Missing expected output file: $expected"
2727
exit 1
2828
fi
29-
output="tmp/$(basename $file .x.cf).lint-output.txt"
29+
output="tests/lint/$(basename $file .x.cf).output.txt"
3030
if cfengine lint "$file" > "$output" 2>&1; then
3131
echo "FAIL: $file - expected lint failure but got success"
3232
exit 1

0 commit comments

Comments
 (0)