diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-10-21 15:37:44 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-10-25 13:00:43 +0200 |
commit | e6127d3cbd4fb8b3dd82bc740692877b72f977b7 (patch) | |
tree | b229db4b17c4bcfef5ea9ea8deed61f355bf151d /test/end-to-end/serve-service/serve-git-tree-root/present.sh | |
parent | 5e0fea2f02f8e721f44ea23302ade010e9f9bb97 (diff) | |
download | justbuild-e6127d3cbd4fb8b3dd82bc740692877b72f977b7.tar.gz |
Enable compatible mode for just-mr and SourceTree serve service...
...by using the new local api that can handle any remote endpoint,
irrespective of protocol.
Also ensure all tests for the serve service are now being run both
in native and compatible modes.
Diffstat (limited to 'test/end-to-end/serve-service/serve-git-tree-root/present.sh')
-rw-r--r-- | test/end-to-end/serve-service/serve-git-tree-root/present.sh | 62 |
1 files changed, 23 insertions, 39 deletions
diff --git a/test/end-to-end/serve-service/serve-git-tree-root/present.sh b/test/end-to-end/serve-service/serve-git-tree-root/present.sh index 2a704b52..4b05f9b5 100644 --- a/test/end-to-end/serve-service/serve-git-tree-root/present.sh +++ b/test/end-to-end/serve-service/serve-git-tree-root/present.sh @@ -16,7 +16,7 @@ ### # This test checks if we can make a present root for a Git-tree repository -# using the serve endpoint. This can only succeed in native mode. +# using the serve endpoint. ## set -eu @@ -59,43 +59,27 @@ EOF # Run the checks ## -# Compute present root by asking the serve endpoint to set it up for us. This -# requires remotes in native mode. -if [ -z "${COMPAT}" ]; then - - 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_0}" - - # Compute present root locally from now populated Git cache - ${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_0}" - -else - - echo --- - echo Checking expected failures - - "${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 +# Compute present root by asking the serve endpoint to set it up for us. +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_0}" + +# Compute present root locally from now populated Git cache +${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_0}" echo OK |