- Adjusting tests so they run without referencing /tmp

This commit is contained in:
Ian Roddis
2021-08-23 17:37:33 -03:00
parent 8eb966377f
commit d4c9b3fcee
3 changed files with 22 additions and 20 deletions

View File

@@ -73,11 +73,11 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
"taskParameters": { "FILE": [ "A", "B" ] },
"tasks": [
{ "name": "touch",
"command": [ "/usr/bin/touch", "/tmp/{{FILE}}" ]
"command": [ "/usr/bin/touch", "dagrun_{{FILE}}" ]
},
{
"name": "cat",
"command": [ "/usr/bin/cat", "/tmp/A", "/tmp/B" ],
"command": [ "/usr/bin/cat", "dagrun_A", "dagrun_B" ],
"parents": [ "touch" ]
}
]
@@ -85,8 +85,9 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
auto response = REQUEST(baseURL + "/v1/dagrun/", dagRun);
REQUIRE(response.code() == Pistache::Http::Code::Ok);
std::this_thread::sleep_for(std::chrono::seconds(2));
for (const auto &pth : std::vector<fs::path>{"/tmp/A", "/tmp/B"}) {
for (const auto &pth : std::vector<fs::path>{"dagrun_A", "dagrun_B"}) {
REQUIRE(fs::exists(pth));
fs::remove(pth);
}