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

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 764
Merged at revision: 771
Proposed branch: lp:~elopio/snappy/examples3
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Prerequisite: lp:~elopio/snappy/examples2
Diff against target: 111 lines (+32/-10)
5 files modified
_integration-tests/data/snaps/basic-framework/meta/package.yaml (+5/-0)
_integration-tests/data/snaps/basic-framework/meta/readme.md (+3/-0)
_integration-tests/tests/installApp_test.go (+9/-6)
_integration-tests/tests/installFramework_test.go (+13/-4)
_integration-tests/testutils/data/data.go (+2/-0)
To merge this branch: bzr merge lp:~elopio/snappy/examples3
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+274299@code.launchpad.net

This proposal supersedes a proposal from 2015-10-13.

Commit message

Updated the install integration tests to use local snaps.

To post a comment you must log in.
lp:~elopio/snappy/examples3 updated
763. By Leo Arias

Fixed fmt.

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Great Leo, thanks! Small ignorable nit inline :)

review: Approve
lp:~elopio/snappy/examples3 updated
764. By Leo Arias

Updated the readme.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory '_integration-tests/data/snaps/basic-framework'
=== added directory '_integration-tests/data/snaps/basic-framework/meta'
=== added file '_integration-tests/data/snaps/basic-framework/meta/package.yaml'
--- _integration-tests/data/snaps/basic-framework/meta/package.yaml 1970-01-01 00:00:00 +0000
+++ _integration-tests/data/snaps/basic-framework/meta/package.yaml 2015-10-14 22:56:54 +0000
@@ -0,0 +1,5 @@
1name: basic-framework
2version: 1.0
3vendor: Snappy Developers <snappy-devel@lists.ubuntu.com>
4icon: meta/snappy64.png
5type: framework
06
=== added file '_integration-tests/data/snaps/basic-framework/meta/readme.md'
--- _integration-tests/data/snaps/basic-framework/meta/readme.md 1970-01-01 00:00:00 +0000
+++ _integration-tests/data/snaps/basic-framework/meta/readme.md 2015-10-14 22:56:54 +0000
@@ -0,0 +1,3 @@
1Basic framework snap
2
3A basic buildable framework snap
04
=== added file '_integration-tests/data/snaps/basic-framework/meta/snappy64.png'
1Binary files _integration-tests/data/snaps/basic-framework/meta/snappy64.png 1970-01-01 00:00:00 +0000 and _integration-tests/data/snaps/basic-framework/meta/snappy64.png 2015-10-14 22:56:54 +0000 differ5Binary files _integration-tests/data/snaps/basic-framework/meta/snappy64.png 1970-01-01 00:00:00 +0000 and _integration-tests/data/snaps/basic-framework/meta/snappy64.png 2015-10-14 22:56:54 +0000 differ
=== modified file '_integration-tests/tests/installApp_test.go'
--- _integration-tests/tests/installApp_test.go 2015-10-13 15:56:03 +0000
+++ _integration-tests/tests/installApp_test.go 2015-10-14 22:56:54 +0000
@@ -20,6 +20,7 @@
20package tests20package tests
2121
22import (22import (
23 "fmt"
23 "os"24 "os"
24 "os/exec"25 "os/exec"
2526
@@ -38,16 +39,18 @@
38}39}
3940
40func (s *installAppSuite) TestInstallAppMustPrintPackageInformation(c *check.C) {41func (s *installAppSuite) TestInstallAppMustPrintPackageInformation(c *check.C) {
41 installOutput := common.InstallSnap(c, "hello-world")42 snapPath, err := build.LocalSnap(c, data.BasicSnapName)
42 s.AddCleanup(func() {43 defer os.Remove(snapPath)
43 common.RemoveSnap(c, "hello-world")44 c.Assert(err, check.IsNil)
44 })45 installOutput := common.InstallSnap(c, snapPath)
46 defer common.RemoveSnap(c, data.BasicSnapName)
4547
46 expected := "(?ms)" +48 expected := "(?ms)" +
47 "Installing hello-world\n" +49 fmt.Sprintf("Installing %s\n", snapPath) +
50 ".*Signature check failed, but installing anyway as requested\n" +
48 "Name +Date +Version +Developer \n" +51 "Name +Date +Version +Developer \n" +
49 ".*" +52 ".*" +
50 "^hello-world +.* +.* +canonical \n" +53 "^basic +.* +.* +sideload *\n" +
51 ".*"54 ".*"
5255
53 c.Assert(installOutput, check.Matches, expected)56 c.Assert(installOutput, check.Matches, expected)
5457
=== modified file '_integration-tests/tests/installFramework_test.go'
--- _integration-tests/tests/installFramework_test.go 2015-10-08 06:53:50 +0000
+++ _integration-tests/tests/installFramework_test.go 2015-10-14 22:56:54 +0000
@@ -20,7 +20,12 @@
20package tests20package tests
2121
22import (22import (
23 "fmt"
24 "os"
25
26 "launchpad.net/snappy/_integration-tests/testutils/build"
23 "launchpad.net/snappy/_integration-tests/testutils/common"27 "launchpad.net/snappy/_integration-tests/testutils/common"
28 "launchpad.net/snappy/_integration-tests/testutils/data"
2429
25 "gopkg.in/check.v1"30 "gopkg.in/check.v1"
26)31)
@@ -32,14 +37,18 @@
32}37}
3338
34func (s *installFrameworkSuite) TestInstallFrameworkMustPrintPackageInformation(c *check.C) {39func (s *installFrameworkSuite) TestInstallFrameworkMustPrintPackageInformation(c *check.C) {
35 installOutput := common.InstallSnap(c, "hello-dbus-fwk.canonical")40 snapPath, err := build.LocalSnap(c, data.BasicFrameworkSnapName)
36 defer common.RemoveSnap(c, "hello-dbus-fwk.canonical")41 defer os.Remove(snapPath)
42 c.Assert(err, check.IsNil)
43 installOutput := common.InstallSnap(c, snapPath)
44 defer common.RemoveSnap(c, data.BasicFrameworkSnapName)
3745
38 expected := "(?ms)" +46 expected := "(?ms)" +
39 "Installing hello-dbus-fwk.canonical\n" +47 fmt.Sprintf("Installing %s\n", snapPath) +
48 ".*Signature check failed, but installing anyway as requested\n" +
40 "Name +Date +Version +Developer \n" +49 "Name +Date +Version +Developer \n" +
41 ".*" +50 ".*" +
42 "^hello-dbus-fwk +.* +.* +canonical \n" +51 "^basic-framework +.* +.* +sideload *\n" +
43 ".*"52 ".*"
4453
45 c.Assert(installOutput, check.Matches, expected)54 c.Assert(installOutput, check.Matches, expected)
4655
=== modified file '_integration-tests/testutils/data/data.go'
--- _integration-tests/testutils/data/data.go 2015-10-13 13:53:48 +0000
+++ _integration-tests/testutils/data/data.go 2015-10-14 22:56:54 +0000
@@ -26,6 +26,8 @@
26 BasicSnapName = "basic"26 BasicSnapName = "basic"
27 // BasicBinariesSnapName is the name of the basic snap with binaries27 // BasicBinariesSnapName is the name of the basic snap with binaries
28 BasicBinariesSnapName = "basic-binaries"28 BasicBinariesSnapName = "basic-binaries"
29 // BasicFrameworkSnapName is the name of the basic framework snap
30 BasicFrameworkSnapName = "basic-framework"
29 // WrongYamlSnapName is the name of a snap with an invalid meta yaml31 // WrongYamlSnapName is the name of a snap with an invalid meta yaml
30 WrongYamlSnapName = "wrong-yaml"32 WrongYamlSnapName = "wrong-yaml"
31 // MissingReadmeSnapName is the name of a snap without readme33 // MissingReadmeSnapName is the name of a snap without readme

Subscribers

People subscribed via source and target branches