Adding support for isGenerator tasks
- Changing how DAG is represented, both in code and how DAGs are defined in JSON. - Removing std::vector<Task> representation in favour of a map that will enforce unique task names - Task names now have a name (generated), and a definedName. - Adding support to loggers to add tasks after a DAGRun has been initialized.
This commit is contained in:
@@ -74,16 +74,12 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
|
||||
std::string dagRun = R"({
|
||||
"name": "unit_server",
|
||||
"taskParameters": { "FILE": [ "A", "B" ] },
|
||||
"tasks": [
|
||||
{ "name": "touch",
|
||||
"command": [ "/usr/bin/touch", "dagrun_{{FILE}}" ]
|
||||
},
|
||||
{
|
||||
"name": "cat",
|
||||
"command": [ "/usr/bin/cat", "dagrun_A", "dagrun_B" ],
|
||||
"tasks": {
|
||||
"touch": { "command": [ "/usr/bin/touch", "dagrun_{{FILE}}" ] },
|
||||
"cat": { "command": [ "/usr/bin/cat", "dagrun_A", "dagrun_B" ],
|
||||
"parents": [ "touch" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
})";
|
||||
|
||||
|
||||
@@ -160,7 +156,7 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
|
||||
REQUIRE(complete);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||
for (const auto &pth : std::vector<fs::path>{"dagrun_A", "dagrun_B"}) {
|
||||
for (const auto &pth: std::vector<fs::path>{"dagrun_A", "dagrun_B"}) {
|
||||
REQUIRE(fs::exists(pth));
|
||||
fs::remove(pth);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user