From 4083ddd5d3f0765e1946375bfba195749a563db5 Mon Sep 17 00:00:00 2001 From: Jorge Camarero Vera <jorge.camarero@cern.ch> Date: Mon, 17 Oct 2022 10:30:58 +0200 Subject: [PATCH] Fix broken test after issue #48 --- tapeserver/cta-tapedSystemtests.cpp | 3 ++- tapeserver/daemon/TapeDaemon.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tapeserver/cta-tapedSystemtests.cpp b/tapeserver/cta-tapedSystemtests.cpp index dc14d5f567..9cb9c1ea83 100644 --- a/tapeserver/cta-tapedSystemtests.cpp +++ b/tapeserver/cta-tapedSystemtests.cpp @@ -58,7 +58,8 @@ TEST(cta_taped, InvocationTests) { ctaConf.stringAppend(tpConfig.path()); cta::threading::SubProcess spNoDrive("cta-taped", std::list<std::string>({"cta-taped", "-f", "-s", "-c", ctaConf.path()})); spNoDrive.wait(); - ASSERT_NE(std::string::npos, spNoDrive.stdout().find("MSG=\"Aborting cta-taped on uncaught exception. Stack trace follows.\" Message=\"No drive found in configuration\"")); + ASSERT_NE(std::string::npos, spNoDrive.stdout().find("MSG=\"Aborting cta-taped. Not starting because: " + "No drive found in configuration\"")); ASSERT_TRUE(spNoDrive.stderr().empty()); ASSERT_EQ(EXIT_FAILURE, spNoDrive.exitValue()); } diff --git a/tapeserver/daemon/TapeDaemon.cpp b/tapeserver/daemon/TapeDaemon.cpp index 0f1e08eda6..f715606f05 100644 --- a/tapeserver/daemon/TapeDaemon.cpp +++ b/tapeserver/daemon/TapeDaemon.cpp @@ -53,7 +53,7 @@ int TapeDaemon::main() { exceptionThrowingMain(); } catch (cta::exception::NoSuchObject &ex) { m_log(log::ERR, "Aborting cta-taped. Not starting because: " + ex.getMessage().str()); - return 2; + return 1; } catch (cta::exception::Exception &ex) { // Log the error m_log(log::ERR, "Aborting cta-taped on uncaught exception. Stack trace follows.", {{"Message", ex.getMessage().str()}}); -- GitLab