Merge lp:~jamesodhunt/snappy/selftest-add-pkg-removal-tests into lp:snappy/selftest

Proposed by James Hunt
Status: Merged
Merged at revision: 32
Proposed branch: lp:~jamesodhunt/snappy/selftest-add-pkg-removal-tests
Merge into: lp:snappy/selftest
Diff against target: 17 lines (+8/-0)
2 files modified
tests/12_test_remove_hello (+3/-0)
tests/13_test_remove_invalid (+5/-0)
To merge this branch: bzr merge lp:~jamesodhunt/snappy/selftest-add-pkg-removal-tests
Reviewer Review Type Date Requested Status
Michael Vogt (community) Needs Fixing
John Lenton (community) Approve
Review via email: mp+255054@code.launchpad.net

Description of the change

* Add 2 package removal tests:
  - tests/12_test_remove_hello
  - tests/13_test_remove_invalid

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

+1, with a comment.

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the branch. Unfortunately it does work when testing on snappy:
"""
...
Running /apps/snappy-selftest/0.1/tests/12_test_remove_hello
Can not find '^Removing hello' in 'need root'
ERROR
FAILED: /apps/snappy-selftest/0.1/tests/12_test_remove_hello
"""

Looks like a missing "sudo" in the tests.

review: Needs Fixing
31. By James Hunt

* tests/12_test_remove_hello:
  - Added missing sudo call.
* tests/13_test_remove_invalid:
  - Added missing sudo call.
  - Updated for changed message.

32. By James Hunt

* Sync with lp:snappy/selftest.

Revision history for this message
James Hunt (jamesodhunt) wrote :

Branch updated.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'tests/12_test_remove_hello'
2--- tests/12_test_remove_hello 1970-01-01 00:00:00 +0000
3+++ tests/12_test_remove_hello 2015-04-09 08:34:44 +0000
4@@ -0,0 +1,3 @@
5+test() {
6+ test_regexp "^Removing hello" sudo $SNAPPY remove hello
7+}
8
9=== added file 'tests/13_test_remove_invalid'
10--- tests/13_test_remove_invalid 1970-01-01 00:00:00 +0000
11+++ tests/13_test_remove_invalid 2015-04-09 08:34:44 +0000
12@@ -0,0 +1,5 @@
13+test() {
14+ pkg=foobarbazinvalid
15+ test_regexp "^Removing $pkg" sudo $SNAPPY remove $pkg
16+ test_regexp "^snappy package not found" sudo $SNAPPY remove $pkg
17+}

Subscribers

People subscribed via source and target branches

to all changes: