From 3d6e428d1990bd17f01ccdc84881e114c05384b4 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Wed, 27 Jul 2022 18:54:16 +0200 Subject: Executor Test: Add proper guards for optionals --- test/buildtool/execution_engine/executor/executor_api.test.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/buildtool/execution_engine/executor') diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp index f36a89b8..d1b13ee5 100755 --- a/test/buildtool/execution_engine/executor/executor_api.test.hpp +++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp @@ -106,6 +106,7 @@ static inline void RunHelloWorldCompilation(ApiFactory const& factory, // retrieve ALL artifacts REQUIRE(FileSystemManager::CreateDirectory(tmpdir)); for (auto const& artifact_id : g.ArtifactIdentifiers()) { + REQUIRE(g.ArtifactNodeWithId(artifact_id)->Content().Info()); CHECK(api->RetrieveToPaths( {*g.ArtifactNodeWithId(artifact_id)->Content().Info()}, {(tmpdir / "output").string()})); @@ -213,6 +214,7 @@ static inline void RunGreeterCompilation(ApiFactory const& factory, // retrieve ALL artifacts REQUIRE(FileSystemManager::CreateDirectory(tmpdir)); for (auto const& artifact_id : g.ArtifactIdentifiers()) { + REQUIRE(g.ArtifactNodeWithId(artifact_id)->Content().Info()); CHECK(api->RetrieveToPaths( {*g.ArtifactNodeWithId(artifact_id)->Content().Info()}, {(tmpdir / "output").string()})); @@ -363,6 +365,7 @@ static inline void TestUploadAndDownloadTrees(ApiFactory const& factory, std::vector infos{}; std::vector paths{}; for (auto const& [path, node] : action_node->OutputFiles()) { + REQUIRE(node->Content().Info()); paths.emplace_back(tmpdir / path); infos.emplace_back(*node->Content().Info()); } -- cgit v1.2.3