diff options
Diffstat (limited to 'test/end-to-end/serve-service/serve-archive-root/resolved-present.sh')
-rw-r--r-- | test/end-to-end/serve-service/serve-archive-root/resolved-present.sh | 74 |
1 files changed, 29 insertions, 45 deletions
diff --git a/test/end-to-end/serve-service/serve-archive-root/resolved-present.sh b/test/end-to-end/serve-service/serve-archive-root/resolved-present.sh index d2ecf13c..bd9b17c9 100644 --- a/test/end-to-end/serve-service/serve-archive-root/resolved-present.sh +++ b/test/end-to-end/serve-service/serve-archive-root/resolved-present.sh @@ -15,8 +15,9 @@ ### -# This test checks 3 of the options to make a present root for an archive, where: -# - archive is in local distfile; +# This test checks 3 of the options to make a present root for an archive, +# where: +# - archive is in a local distfile; # - there is already a file association to the unresolved root tree; # - we receive the archive content from serve endpoint via the remote CAS. # @@ -99,48 +100,31 @@ cat "${CONF}" echo test $(jq -r '.repositories.main.workspace_root[1]' "${CONF}") = "${TREE}" -# We now test if the serve endpoint can provide us the root. This can only -# happen in we're in native mode. -if [ -z "${COMPAT}" ]; then - - # In a clean build root, ask serve to set up the root for us, from scratch - rm -rf "${LBR}" - - CONF=$("${JUST_MR}" --norc -C repos.json \ - --just "${JUST}" \ - --local-build-root "${LBR}" \ - --log-limit 6 \ - ${ENDPOINT_ARGS} setup main) - cat "${CONF}" - echo - test $(jq -r '.repositories.main.workspace_root[1]' "${CONF}") = "${TREE}" - - # Double-check the file association was created and root remains available - # without the remote endpoints - ${JUST} gc --local-build-root ${LBR} 2>&1 - ${JUST} gc --local-build-root ${LBR} 2>&1 - - CONF=$("${JUST_MR}" --norc -C repos.json \ - --just "${JUST}" \ - --local-build-root "${LBR}" \ - --log-limit 6 \ - setup main) - cat "${CONF}" - echo - test $(jq -r '.repositories.main.workspace_root[1]' "${CONF}") = "${TREE}" - -else - - echo --- - echo Checking expected failures - - rm -rf "${LBR}" - "${JUST_MR}" --norc -C repos.json \ - --just "${JUST}" \ - --local-build-root "${LBR}" \ - --log-limit 6 \ - ${ENDPOINT_ARGS} setup main 2>&1 && exit 1 || : - echo Failed as expected -fi +# We now test if the serve endpoint can provide us the root. +# In a clean build root, ask serve to set up the root for us, from scratch +rm -rf "${LBR}" + +CONF=$("${JUST_MR}" --norc -C repos.json \ + --just "${JUST}" \ + --local-build-root "${LBR}" \ + --log-limit 6 \ + ${ENDPOINT_ARGS} setup main) +cat "${CONF}" +echo +test $(jq -r '.repositories.main.workspace_root[1]' "${CONF}") = "${TREE}" + +# Double-check the file association was created and root remains available +# without the remote endpoints +${JUST} gc --local-build-root ${LBR} 2>&1 +${JUST} gc --local-build-root ${LBR} 2>&1 + +CONF=$("${JUST_MR}" --norc -C repos.json \ + --just "${JUST}" \ + --local-build-root "${LBR}" \ + --log-limit 6 \ + setup main) +cat "${CONF}" +echo +test $(jq -r '.repositories.main.workspace_root[1]' "${CONF}") = "${TREE}" echo OK |