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
=== modified file '_integration-tests/helpers/common/common.go'
--- _integration-tests/helpers/common/common.go 2015-07-22 19:10:20 +0000
+++ _integration-tests/helpers/common/common.go 2015-07-27 14:31:49 +0000
@@ -226,10 +226,10 @@
226}226}
227227
228// CallFakeUpdate calls snappy update after faking the current version228// CallFakeUpdate calls snappy update after faking the current version
229func CallFakeUpdate(c *check.C) {229func CallFakeUpdate(c *check.C) string {
230 c.Log("Preparing fake and calling update.")230 c.Log("Preparing fake and calling update.")
231 fakeAvailableUpdate(c)231 fakeAvailableUpdate(c)
232 ExecCommand(c, "sudo", "snappy", "update")232 return ExecCommand(c, "sudo", "snappy", "update")
233}233}
234234
235func fakeAvailableUpdate(c *check.C) {235func fakeAvailableUpdate(c *check.C) {
236236
=== modified file '_integration-tests/tests/update_test.go'
--- _integration-tests/tests/update_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/update_test.go 2015-07-27 14:31:49 +0000
@@ -37,7 +37,11 @@
37// be up-to-date after running this test.37// be up-to-date after running this test.
38func (s *updateSuite) TestUpdateToSameReleaseAndChannel(c *check.C) {38func (s *updateSuite) TestUpdateToSameReleaseAndChannel(c *check.C) {
39 if BeforeReboot() {39 if BeforeReboot() {
40 CallFakeUpdate(c)40 updateOutput := CallFakeUpdate(c)
41 expected := "(?ms)" +
42 ".*" +
43 "^Reboot to use .*ubuntu-core.\n"
44 c.Assert(updateOutput, check.Matches, expected)
41 Reboot(c)45 Reboot(c)
42 } else if AfterReboot(c) {46 } else if AfterReboot(c) {
43 RemoveRebootMark(c)47 RemoveRebootMark(c)

Subscribers

People subscribed via source and target branches