Merge lp:~elopio/snappy/test_go_install_unexisting into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 583
Merged at revision: 585
Proposed branch: lp:~elopio/snappy/test_go_install_unexisting
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Prerequisite: lp:~elopio/snappy/test_go_xkcd
Diff against target: 27 lines (+10/-5)
2 files modified
_integration-tests/tests/05_test_install_nonexistant (+0/-5)
_integration-tests/tests/latest/installApp_test.go (+10/-0)
To merge this branch: bzr merge lp:~elopio/snappy/test_go_install_unexisting
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+264792@code.launchpad.net

Commit message

Translated the install noexistent integration test to go.

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

Great, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file '_integration-tests/tests/05_test_install_nonexistant'
2--- _integration-tests/tests/05_test_install_nonexistant 2015-06-15 15:36:29 +0000
3+++ _integration-tests/tests/05_test_install_nonexistant 1970-01-01 00:00:00 +0000
4@@ -1,5 +0,0 @@
5-test() {
6- pkg=fizzler
7- T="^${pkg} failed to install: snappy package not found"
8- test_regexp "$T" sudo $SNAPPY install $pkg
9-}
10
11=== modified file '_integration-tests/tests/latest/installApp_test.go'
12--- _integration-tests/tests/latest/installApp_test.go 2015-07-15 05:37:03 +0000
13+++ _integration-tests/tests/latest/installApp_test.go 2015-07-15 05:37:03 +0000
14@@ -109,3 +109,13 @@
15 c.Check(resp.Status, check.Equals, "200 OK")
16 c.Assert(resp.Proto, check.Equals, "HTTP/1.0")
17 }
18+
19+func (s *installAppSuite) TestInstallUnexistingAppMustPrintError(c *check.C) {
20+ cmd := exec.Command("sudo", "snappy", "install", "unexisting.canonical")
21+ output, err := cmd.CombinedOutput()
22+
23+ c.Assert(err, check.NotNil)
24+ c.Assert(string(output), check.Equals,
25+ "Installing unexisting.canonical\n"+
26+ "unexisting.canonical failed to install: snappy package not found\n")
27+}

Subscribers

People subscribed via source and target branches