Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Unified Diff: terminator_unittest.cc

Issue 5245002: AU: Exit with status 1 through the Terminator. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « terminator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: terminator_unittest.cc
diff --git a/terminator_unittest.cc b/terminator_unittest.cc
index 8582b99e705a35d08b92353e209dc76702107cb4..b0f419188d7dbdc97fd67491ba42936c8d570866 100644
--- a/terminator_unittest.cc
+++ b/terminator_unittest.cc
@@ -34,7 +34,7 @@ void UnblockExitThroughUnblocker() {
}
void RaiseSIGTERM() {
- ASSERT_EXIT(raise(SIGTERM), ExitedWithCode(0), "");
+ ASSERT_EXIT(raise(SIGTERM), ExitedWithCode(1), "");
}
} // namespace {}
@@ -54,9 +54,9 @@ TEST_F(TerminatorTest, ScopedTerminatorExitUnblockerTest) {
}
TEST_F(TerminatorDeathTest, ExitTest) {
- ASSERT_EXIT(Terminator::Exit(), ExitedWithCode(0), "");
+ ASSERT_EXIT(Terminator::Exit(), ExitedWithCode(1), "");
Terminator::set_exit_blocked(true);
- ASSERT_EXIT(Terminator::Exit(), ExitedWithCode(0), "");
+ ASSERT_EXIT(Terminator::Exit(), ExitedWithCode(1), "");
}
TEST_F(TerminatorDeathTest, RaiseSignalTest) {
@@ -68,7 +68,7 @@ TEST_F(TerminatorDeathTest, RaiseSignalTest) {
TEST_F(TerminatorDeathTest, ScopedTerminatorExitUnblockerExitTest) {
Terminator::set_exit_blocked(true);
Terminator::exit_requested_ = 1;
- ASSERT_EXIT(UnblockExitThroughUnblocker(), ExitedWithCode(0), "");
+ ASSERT_EXIT(UnblockExitThroughUnblocker(), ExitedWithCode(1), "");
}
} // namespace chromeos_update_engine
« no previous file with comments | « terminator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698