Simplify test output
This commit is contained in:
@@ -8,9 +8,9 @@ function TestGetContent()
|
|||||||
actualMd5="$(md5sum $downloadedFile | awk '{print $1}')"
|
actualMd5="$(md5sum $downloadedFile | awk '{print $1}')"
|
||||||
|
|
||||||
if [ "$expectedMd5" == "$actualMd5" ]; then
|
if [ "$expectedMd5" == "$actualMd5" ]; then
|
||||||
echo "SUCCESS for $1"
|
echo "SUCCESS GET $1"
|
||||||
else
|
else
|
||||||
echo "FAILURE MD5 differs for $1"
|
echo "FAILURE GET MD5 differs for $1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm $downloadedFile
|
rm $downloadedFile
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ function TestGetHeader()
|
|||||||
regexPattern="Content\-Type: $2"
|
regexPattern="Content\-Type: $2"
|
||||||
headerContentType="$(egrep -o "$regexPattern" $curlHeaderOutputFile)"
|
headerContentType="$(egrep -o "$regexPattern" $curlHeaderOutputFile)"
|
||||||
if [ -n "$headerContentType" ]; then
|
if [ -n "$headerContentType" ]; then
|
||||||
echo "SUCCESS GET headers for $1 has correct MIME type"
|
echo "SUCCESS HEAD $1"
|
||||||
else
|
else
|
||||||
echo "FAILURE GET headers for $1 contains bad MIME type (expected <Content-Type: $2> but got <$headerContentType>)"
|
echo "FAILURE HEAD $1 contains bad MIME type (expected <Content-Type: $2> but got <$headerContentType>)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm $curlHeaderOutputFile
|
rm $curlHeaderOutputFile
|
||||||
else
|
else
|
||||||
echo "FAILURE Cannot GET headers for $1"
|
echo "FAILURE Cannot HEAD $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user