Massive re-org to allow per-executor job specification formats and executor-specific task validation and expansion.
A few different renames to try and keep things more consistent.
This commit is contained in:
@@ -6,9 +6,10 @@
|
||||
#include <pistache/client.h>
|
||||
#include <rapidjson/document.h>
|
||||
|
||||
#include "daggy/Server.hpp"
|
||||
#include "daggy/executors/task/ForkingTaskExecutor.hpp"
|
||||
#include "daggy/loggers/dag_run/OStreamLogger.hpp"
|
||||
#include <daggy/Server.hpp>
|
||||
#include <daggy/Serialization.hpp>
|
||||
#include <daggy/executors/task/ForkingTaskExecutor.hpp>
|
||||
#include <daggy/loggers/dag_run/OStreamLogger.hpp>
|
||||
|
||||
namespace rj = rapidjson;
|
||||
|
||||
@@ -73,10 +74,10 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
|
||||
SECTION("Simple DAGRun Submission") {
|
||||
std::string dagRun = R"({
|
||||
"name": "unit_server",
|
||||
"taskParameters": { "FILE": [ "A", "B" ] },
|
||||
"parameters": { "FILE": [ "A", "B" ] },
|
||||
"tasks": {
|
||||
"touch": { "command": [ "/usr/bin/touch", "dagrun_{{FILE}}" ] },
|
||||
"cat": { "command": [ "/usr/bin/cat", "dagrun_A", "dagrun_B" ],
|
||||
"touch": { "job": { "command": [ "/usr/bin/touch", "dagrun_{{FILE}}" ]} },
|
||||
"cat": { "job": { "command": [ "/usr/bin/cat", "dagrun_A", "dagrun_B" ]},
|
||||
"parents": [ "touch" ]
|
||||
}
|
||||
}
|
||||
@@ -90,8 +91,7 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
|
||||
REQUIRE(response.code() == Pistache::Http::Code::Ok);
|
||||
|
||||
rj::Document doc;
|
||||
rj::ParseResult parseResult = doc.Parse(response.body().c_str());
|
||||
REQUIRE(parseResult);
|
||||
daggy::checkRJParse(doc.Parse(response.body().c_str()));
|
||||
REQUIRE(doc.IsObject());
|
||||
REQUIRE(doc.HasMember("runID"));
|
||||
|
||||
@@ -104,8 +104,7 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
|
||||
REQUIRE(response.code() == Pistache::Http::Code::Ok);
|
||||
|
||||
rj::Document doc;
|
||||
rj::ParseResult parseResult = doc.Parse(response.body().c_str());
|
||||
REQUIRE(parseResult);
|
||||
daggy::checkRJParse(doc.Parse(response.body().c_str()));
|
||||
REQUIRE(doc.IsArray());
|
||||
REQUIRE(doc.Size() >= 1);
|
||||
|
||||
@@ -134,8 +133,7 @@ TEST_CASE("Server Basic Endpoints", "[server_basic]") {
|
||||
auto response = REQUEST(baseURL + "/v1/dagrun/" + std::to_string(runID));
|
||||
REQUIRE(response.code() == Pistache::Http::Code::Ok);
|
||||
rj::Document doc;
|
||||
rj::ParseResult parseResult = doc.Parse(response.body().c_str());
|
||||
REQUIRE(parseResult);
|
||||
daggy::checkRJParse(doc.Parse(response.body().c_str()));
|
||||
REQUIRE(doc.IsObject());
|
||||
|
||||
REQUIRE(doc.HasMember("taskStates"));
|
||||
|
||||
Reference in New Issue
Block a user