X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=bb28699ec9bf76837e9048055dd8c867830ecc3c;hp=0c4a5bd2986000e6efb4b91a187e8e0c5dac0f90;hb=1f560cfaaea555f037a99a6790eade56434eb119;hpb=51d5997996ea8be2f545f13c3258b56e19a4e291 diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 0c4a5bd..bb28699 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -1487,6 +1487,21 @@ bool Launcher::eventOperation(const std::string &operation, std::string &respons opt_response_content += anna::functions::asString(id); opt_response_content += ")"; } + else if(param1 == "run") { + if (numParams > 2) + throw anna::RuntimeException("Wrong body content format on HTTP Request. Check 'HELP.md' for more information.", ANNA_FILE_LOCATION); + + if(param2 == "") throw anna::RuntimeException("Missing id for test run operation", ANNA_FILE_LOCATION); + int id = atoi(param2.c_str()); + if (testManager.runTestCase(id)) { + opt_response_content = "test executed for id provided ("; + } + else { + opt_response_content = "cannot found test id ("; + } + opt_response_content += anna::functions::asString(id); + opt_response_content += ")"; + } else if(param1 == "look") { if (numParams > 2) throw anna::RuntimeException("Wrong body content format on HTTP Request. Check 'HELP.md' for more information.", ANNA_FILE_LOCATION);