Skip to content

Commit

Permalink
[do not merge] zsh-compatible version of run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew7234 committed Mar 8, 2024
1 parent e436932 commit f05a4f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/e2e_regression/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ for ((i = 0; i < nCases; i++)); do
>/tmp/pretty 2>/dev/null &&
cp /tmp/pretty "$outDir/$name.body" || true
# Sanitize the current timestamp out of the response header so that diffs are stable
sed -i -E 's/^(Date|Content-Length|Last-Modified): .*/\1: UNINTERESTING/g' "$outDir/$name.headers"
sed -i '' -E 's/^(Date|Content-Length|Last-Modified): .*/\1: UNINTERESTING/g' "$outDir/$name.headers"
else
# $param is a SQL query; fetch the DB response
$psql -A -o /dev/stdout -c "COPY ($param) TO STDOUT CSV HEADER" | sed $'s/\r$//' >"$outDir/$name.csv" \
Expand All @@ -103,7 +103,7 @@ diff --recursive "$TEST_DIR/expected" "$outDir" >/dev/null || {
{
# The expected files contain a symlink, which 'git diff' cannot follow (but regular 'diff' can).
# Create a copy of the `expected` dir with the symlink contents materialized; we'll diff against that.
rm -rf /tmp/nexus-e2e-expected; cp -r --dereference "$TEST_DIR/expected" /tmp/nexus-e2e-expected;
rm -rf /tmp/nexus-e2e-expected; cp -rL "$TEST_DIR/expected" /tmp/nexus-e2e-expected;
}
if [[ -t 1 ]]; then # Running in a terminal
echo "Press enter see the diff, or Ctrl-C to abort."
Expand Down

0 comments on commit f05a4f3

Please sign in to comment.