Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix e2edev since docker build message is changed with docker buildkit #3866

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions test/gov/hzn_dev_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@

# Verify a response. The inputs are:
# $1 - the response
# $2 - expected result
# $3 - error message
# $2 - expected result with docker legacy build
# $3 - expected result with DOCKER_BUILDKIT
# $4 - error message
function verify {
respContains=$(echo $1 | grep "$2")
local resp=$1
respContains=$(echo $resp | grep "$2")
if [ "${respContains}" == "" ]; then
echo -e "\nERROR: $3. Output was:"
echo -e "$1"
exit 1
echo -e "Didn't find \"$2\" in the response, check \"$3\" in response"
# with DOCKER_BUILDKIT, message is: # writing image sha256:[0-9A-Za-z]* done
respContains=$(echo $resp | grep -E "$3")
if [ "${respContains}" == "" ]; then
echo -e "\nERROR: $4. Output was:"
echo -e "$resp"
exit 1
fi
fi
}

Expand All @@ -33,7 +40,7 @@ function createProject {

buildOut=$(make ARCH="${ARCH}" 2>&1)

verify "${buildOut}" "Successfully built" "$2 container did not build"
verify "${buildOut}" "Successfully built" "writing image sha256:[0-9A-Za-z]* done" "$2 container did not build"
if [ $? -ne 0 ]; then exit $?; fi

verify "${buildOut}" "$3" "$2 container did not produce output"
Expand Down
Loading