diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-09-12 17:59:20 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-09-15 14:42:47 +0200 |
commit | f821e6b70c59037384ac6afb3a44517fe46953e6 (patch) | |
tree | 58334f832d4265afe8552c4cf542dcd41a7e75f6 /test/buildtool/serve_api | |
parent | 7f5e729b76865bbf01d1405b08f3292cee4e0e20 (diff) | |
download | justbuild-f821e6b70c59037384ac6afb3a44517fe46953e6.tar.gz |
just serve: add remote execution endpoint and --fetch-absent option
The serve service will communicate with this endpoint when needed,
as well as ensure artifacts it provides are synced with the remote
execution CAS, if requested by the client.
If just-mr is given the --fetch-absent option, it Always produce
present roots irrespective of the 'absent' pragma. For Git repositories
marked with the 'absent' pragma, first try to fetch any commit
trees provided by the serve endpoint from the execution endpoint
CAS, before reverting to a network fetch.
Co-authored-by: Klaus Aehlig <klaus.aehlig@huawei.com>
Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
Diffstat (limited to 'test/buildtool/serve_api')
-rw-r--r-- | test/buildtool/serve_api/target_level_cache_client.test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/buildtool/serve_api/target_level_cache_client.test.cpp b/test/buildtool/serve_api/target_level_cache_client.test.cpp index 00c3e493..972d57eb 100644 --- a/test/buildtool/serve_api/target_level_cache_client.test.cpp +++ b/test/buildtool/serve_api/target_level_cache_client.test.cpp @@ -35,34 +35,34 @@ TEST_CASE("Serve service client: tree-of-commit request", "[serve_api]") { ServeTargetLevelCacheClient tlc_client(info->host, info->port); SECTION("Commit in bare checkout") { - auto root_id = tlc_client.ServeCommitTree(kRootCommit, "."); + auto root_id = tlc_client.ServeCommitTree(kRootCommit, ".", false); REQUIRE(root_id); CHECK(root_id.value() == kRootId); - auto baz_id = tlc_client.ServeCommitTree(kRootCommit, "baz"); + auto baz_id = tlc_client.ServeCommitTree(kRootCommit, "baz", false); REQUIRE(baz_id); CHECK(baz_id.value() == kBazId); } SECTION("Commit in non-bare checkout") { - auto root_id = tlc_client.ServeCommitTree(kRootSymCommit, "."); + auto root_id = tlc_client.ServeCommitTree(kRootSymCommit, ".", false); REQUIRE(root_id); CHECK(root_id.value() == kRootSymId); - auto baz_id = tlc_client.ServeCommitTree(kRootSymCommit, "baz"); + auto baz_id = tlc_client.ServeCommitTree(kRootSymCommit, "baz", false); REQUIRE(baz_id); CHECK(baz_id.value() == kBazSymId); } SECTION("Subdir not found") { auto root_id = - tlc_client.ServeCommitTree(kRootCommit, "does_not_exist"); + tlc_client.ServeCommitTree(kRootCommit, "does_not_exist", false); CHECK_FALSE(root_id); } SECTION("Commit not known") { auto root_id = tlc_client.ServeCommitTree( - "0123456789abcdef0123456789abcdef01234567", "."); + "0123456789abcdef0123456789abcdef01234567", ".", false); CHECK_FALSE(root_id); } } |