ci: Copy https headers to persistent dir for comparison.

This commit is contained in:
Aman Agrawal
2020-04-23 17:16:39 +05:30
committed by Tim Abbott
parent 962af445e9
commit 7c99555107
3 changed files with 4 additions and 3 deletions

View File

@@ -237,6 +237,7 @@ jobs:
# Must be relative path from root
paths:
- zulip-server-test.tar.gz
- success-http-headers.txt
workflows:
version: 2

View File

@@ -55,8 +55,8 @@ grep -vi '\(Vary\|Content-Language\|expires\|issued by\|modified\|saved\|[.][.][
# Simplify the diff by getting replacing 4-5 digit length numbers with <Length>.
sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: <Length>|' /tmp/http-headers-processed
sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: <Length>|' ~/success-http-headers.txt
if ! diff -ur /tmp/http-headers-processed ~/success-http-headers.txt; then
sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: <Length>|' /tmp/success-http-headers.txt
if ! diff -ur /tmp/http-headers-processed /tmp/success-http-headers.txt; then
set +x
echo
echo "FAILURE: The HTTP Headers returned from loading the homepage on the server do not match the contents of tools/ci/success-http-headers.txt. Typically, this means that the server threw a 500 when trying to load the homepage."

View File

@@ -20,7 +20,6 @@ tools/provision --production-test-suite || {
fi
}
cp -a tools/ci/success-http-headers.txt ~/
source tools/ci/activate-venv
if ! ./tools/build-release-tarball test; then
@@ -30,3 +29,4 @@ if ! ./tools/build-release-tarball test; then
fi
mv /tmp/tmp.*/zulip-server-test.tar.gz /tmp/
cp -a tools/ci/success-http-headers.txt /tmp/success-http-headers.txt