From 95f230b3a755f66183ce5c27e929ed6ae3838977 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Mon, 23 Jun 2025 12:09:21 +0200 Subject: ExecutionApi: Drop DirectorySymlinks from common api ... as it is only needed for local execution, there is no need to provide it in the common api interface. --- test/buildtool/execution_api/common/api_test.hpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'test/buildtool/execution_api/common/api_test.hpp') diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp index 6ff56308..34fbb29a 100644 --- a/test/buildtool/execution_api/common/api_test.hpp +++ b/test/buildtool/execution_api/common/api_test.hpp @@ -42,6 +42,7 @@ #include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/execution_api/common/execution_response.hpp" #include "src/buildtool/execution_api/local/config.hpp" +#include "src/buildtool/execution_api/local/local_response.hpp" #include "src/buildtool/execution_engine/dag/dag.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/object_type.hpp" @@ -763,9 +764,12 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory, CHECK(IsTreeObject(artifacts.value()->at("baz").type)); // check if bar was correctly detected as directory symlink - auto dir_symlinks = response->DirectorySymlinks(); - REQUIRE(dir_symlinks); - CHECK((*dir_symlinks)->contains("bar")); + auto* local_response = dynamic_cast(response.get()); + if (local_response != nullptr) { + auto dir_symlinks = local_response->DirectorySymlinks(); + REQUIRE(dir_symlinks); + CHECK((*dir_symlinks)->contains("bar")); + } SECTION("consuming dangling symlinks") { auto dangling_symlinks_tree = artifacts.value()->at("baz"); @@ -826,9 +830,12 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory, CHECK(IsTreeObject(artifacts.value()->at("baz").type)); // check if bar was correctly detected as directory symlink - auto dir_symlinks = response->DirectorySymlinks(); - REQUIRE(dir_symlinks); - CHECK((*dir_symlinks)->contains("bar")); + auto* local_response = dynamic_cast(response.get()); + if (local_response != nullptr) { + auto dir_symlinks = local_response->DirectorySymlinks(); + REQUIRE(dir_symlinks); + CHECK((*dir_symlinks)->contains("bar")); + } SECTION("consuming upwards symlinks") { auto upwards_symlinks_tree = artifacts.value()->at("baz"); -- cgit v1.2.3