Merge lp:~elopio/snappy/selftest-reboot-notice into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 611
Merged at revision: 611
Proposed branch: lp:~elopio/snappy/selftest-reboot-notice
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 33 lines (+7/-3)
2 files modified
_integration-tests/helpers/common/common.go (+2/-2)
_integration-tests/tests/update_test.go (+5/-1)
To merge this branch: bzr merge lp:~elopio/snappy/selftest-reboot-notice
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+265853@code.launchpad.net

Commit message

Check the reboot message on update.

To post a comment you must log in.
Revision history for this message
Federico Gimenez (fgimenez) wrote :

LGTM, thanks

review: Approve
611. By Leo Arias

Fixed the regexp.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_integration-tests/helpers/common/common.go'
2--- _integration-tests/helpers/common/common.go 2015-07-22 19:10:20 +0000
3+++ _integration-tests/helpers/common/common.go 2015-07-27 14:31:49 +0000
4@@ -226,10 +226,10 @@
5 }
6
7 // CallFakeUpdate calls snappy update after faking the current version
8-func CallFakeUpdate(c *check.C) {
9+func CallFakeUpdate(c *check.C) string {
10 c.Log("Preparing fake and calling update.")
11 fakeAvailableUpdate(c)
12- ExecCommand(c, "sudo", "snappy", "update")
13+ return ExecCommand(c, "sudo", "snappy", "update")
14 }
15
16 func fakeAvailableUpdate(c *check.C) {
17
18=== modified file '_integration-tests/tests/update_test.go'
19--- _integration-tests/tests/update_test.go 2015-07-22 18:13:22 +0000
20+++ _integration-tests/tests/update_test.go 2015-07-27 14:31:49 +0000
21@@ -37,7 +37,11 @@
22 // be up-to-date after running this test.
23 func (s *updateSuite) TestUpdateToSameReleaseAndChannel(c *check.C) {
24 if BeforeReboot() {
25- CallFakeUpdate(c)
26+ updateOutput := CallFakeUpdate(c)
27+ expected := "(?ms)" +
28+ ".*" +
29+ "^Reboot to use .*ubuntu-core.\n"
30+ c.Assert(updateOutput, check.Matches, expected)
31 Reboot(c)
32 } else if AfterReboot(c) {
33 RemoveRebootMark(c)

Subscribers

People subscribed via source and target branches