Skip to content

Commit

Permalink
test(e2e): take registry logs when e2e fails (oras-project#830)
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah authored Feb 22, 2023
1 parent 1deed1c commit 7acd160
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/e2e/scripts/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,27 @@ if [ "$clean_up" = '--clean' ]; then
trap "try_clean_up oras-e2e oras-e2e-fallback" EXIT
fi

oras_container_name="oras-e2e"
upstream_container_name="oras-e2e-fallback"
echo " === preparing oras distribution === "
run_registry \
${repo_root}/test/e2e/testdata/distribution/mount \
ghcr.io/oras-project/registry:v1.0.0-rc.4 \
oras-e2e \
$oras_container_name \
$ORAS_REGISTRY_PORT

echo " === preparing upstream distribution === "
run_registry \
${repo_root}/test/e2e/testdata/distribution/mount_fallback \
registry:2.8.1 \
oras-e2e-fallback \
$upstream_container_name \
$ORAS_REGISTRY_FALLBACK_PORT

echo " === run tests === "
ginkgo -r -p --succinct suite
if ! ginkgo -r -p --succinct suite; then
echo '-------- oras distribution trace -------------'
docker logs -t --tail 200 $oras_container_name
echo '-------- upstream distribution trace -------------'
docker logs -t --tail 200 $upstream_container_name
exit 1
fi

0 comments on commit 7acd160

Please sign in to comment.