Allow to clear an specific test case
[anna.git] / example / diameter / launcher / MyHandler.cpp
index dfc29bd..1a7fdc5 100644 (file)
@@ -490,7 +490,9 @@ bool MyHandler::doPOST(const std::string &uri, const nlohmann::json &j, std::str
     result = eop.test__finished(response);
   }
   else if (opType == "/test-clear") {
-    result = eop.test__clear(response);
+    auto it = j.find("id");
+    int id = (it != j.end() && it->is_number_integer()) ? it->get<int>() : -1; // default is: all
+    result = eop.test__clear(response, id);
   }
   else if (opType == "/test-junit") {
     auto it = j.find("targetFile");