Small fixes to test cases

This commit is contained in:
Ian Roddis
2022-01-28 10:23:21 -04:00
parent c09d5b7d8b
commit c9820c19a0
11 changed files with 73 additions and 68 deletions

View File

@@ -18,7 +18,7 @@ TEST_CASE("forking_executor", "[forking_executor]")
{
daggy::Task task{
.job{{"command", daggy::executors::task::ForkingTaskExecutor::Command{
"/usr/bin/echo", "abc", "123"}}}};
"/bin/echo", "abc", "123"}}}};
REQUIRE(ex.validateTaskParameters(task.job));
@@ -32,7 +32,7 @@ TEST_CASE("forking_executor", "[forking_executor]")
SECTION("Simple Run using commandString")
{
daggy::Task task{.job{{"commandString", R"(/usr/bin/echo "abc 123")"}}};
daggy::Task task{.job{{"commandString", R"(/bin/echo "abc 123")"}}};
REQUIRE(ex.validateTaskParameters(task.job));
@@ -100,7 +100,7 @@ TEST_CASE("forking_executor", "[forking_executor]")
{
daggy::Task task{
.job{{"command", daggy::executors::task::ForkingTaskExecutor::Command{
"/usr/bin/sleep", "30"}}}};
"/bin/sleep", "30"}}}};
auto start = daggy::Clock::now();
auto recFuture = ex.execute(0, "command", task);
@@ -120,8 +120,8 @@ TEST_CASE("forking_executor", "[forking_executor]")
SECTION("Large Output")
{
const std::vector<std::string> BIG_FILES{"/usr/share/dict/linux.words",
"/usr/share/dict/cracklib-small",
const std::vector<std::string> BIG_FILES{"/share/dict/linux.words",
"/share/dict/cracklib-small",
"/etc/ssh/moduli"};
for (const auto &bigFile : BIG_FILES) {
@@ -130,7 +130,7 @@ TEST_CASE("forking_executor", "[forking_executor]")
daggy::Task task{
.job{{"command", daggy::executors::task::ForkingTaskExecutor::Command{
"/usr/bin/cat", bigFile}}}};
"/bin/cat", bigFile}}}};
auto recFuture = ex.execute(0, "command", task);
auto rec = recFuture->get();
@@ -147,7 +147,7 @@ TEST_CASE("forking_executor", "[forking_executor]")
auto params = daggy::configFromJSON(testParams);
std::string taskJSON =
R"({"B": {"job": {"command": ["/usr/bin/echo", "{{DATE}}"]}, "children": ["C"]}})";
R"({"B": {"job": {"command": ["/bin/echo", "{{DATE}}"]}, "children": ["C"]}})";
auto tasks = daggy::tasksFromJSON(taskJSON);
auto result = daggy::expandTaskSet(tasks, ex, params);