Skip to content

Commit

Permalink
Cleanup e2e tests (#23)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Jun 1, 2024
1 parent dec45be commit 980db51
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 33 deletions.
21 changes: 2 additions & 19 deletions test/format_cwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,5 @@ cat << 'EOF' > "$TMP/expected_2.json"
}
EOF

if ! cmp -s "$TMP/schema_1.json" "$TMP/expected_1.json"
then
echo "GOT:" 1>&2
cat "$TMP/schema_1.json" 1>&2
echo "EXPECTED:" 1>&2
cat "$TMP/expected_1.json" 1>&2
echo "FAIL" 1>&2
exit 1
fi

if ! cmp -s "$TMP/schema_2.json" "$TMP/expected_2.json"
then
echo "GOT:" 1>&2
cat "$TMP/schema_2.json" 1>&2
echo "EXPECTED:" 1>&2
cat "$TMP/expected_2.json" 1>&2
echo "FAIL" 1>&2
exit 1
fi
diff "$TMP/schema_1.json" "$TMP/expected_1.json"
diff "$TMP/schema_2.json" "$TMP/expected_2.json"
2 changes: 0 additions & 2 deletions test/format_invalid_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand All @@ -16,5 +15,4 @@ then
exit 1
else
echo "PASS" 1>&2
exit 0
fi
2 changes: 0 additions & 2 deletions test/lint_fail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand All @@ -24,5 +23,4 @@ then
exit 1
else
echo "PASS" 1>&2
exit 0
fi
1 change: 0 additions & 1 deletion test/lint_fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand Down
1 change: 0 additions & 1 deletion test/lint_pass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand Down
2 changes: 0 additions & 2 deletions test/test_single_fail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand Down Expand Up @@ -35,5 +34,4 @@ then
exit 1
else
echo "PASS" 1>&2
exit 0
fi
2 changes: 0 additions & 2 deletions test/test_single_unsupported.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand Down Expand Up @@ -35,5 +34,4 @@ then
exit 1
else
echo "PASS" 1>&2
exit 0
fi
2 changes: 0 additions & 2 deletions test/validate_fail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand Down Expand Up @@ -32,5 +31,4 @@ then
exit 1
else
echo "PASS" 1>&2
exit 0
fi
2 changes: 0 additions & 2 deletions test/validate_non_supported.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -o errexit
set -o nounset

TMP="$(mktemp -d)"
# shellcheck disable=SC2317
clean() { rm -rf "$TMP"; }
trap clean EXIT

Expand Down Expand Up @@ -32,5 +31,4 @@ then
exit 1
else
echo "PASS" 1>&2
exit 0
fi

0 comments on commit 980db51

Please sign in to comment.