Skip to content

Commit 4d2e056

Browse files
committed
Update and rework script to test musicbrainz image
* Update to the current location of CSS built file * Rework to provide more details on test failure
1 parent 4275d18 commit 4d2e056

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Diff for: test/test-musicbrainz-image.sh

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
#!/bin/bash
22

3-
set -e -u
3+
set -e -o pipefail -u
44

55
sleep 2m
66

7-
if curl --retry 20 --retry-delay 20 'http://localhost:5000/' \
8-
| grep -q '/static/build/styles/common'
7+
echo -n 'Test local website has locally built style sheet... '
8+
if curl -sS --retry 20 --retry-delay 20 'http://localhost:5000/' \
9+
| grep -q '/static/build/common-[0-9a-f]*.css'
910
then
10-
echo 'Local website has locally built scripts'
11-
exit 0
11+
echo OK
12+
exit 0 # EX_OK
13+
else
14+
echo FAIL
15+
echo "'curl|grep' exited with status '$?'"
16+
echo "Content of 'http://localhost:5000/':"
17+
curl -sS --retry 20 --retry-delay 20 'http://localhost:5000/'
18+
exit 80 # EX_CSSNOTFOUND
1219
fi
13-
14-
exit 1

0 commit comments

Comments
 (0)