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
1=== added directory '_integration-tests/data/snaps/basic-framework'
2=== added directory '_integration-tests/data/snaps/basic-framework/meta'
3=== added file '_integration-tests/data/snaps/basic-framework/meta/package.yaml'
4--- _integration-tests/data/snaps/basic-framework/meta/package.yaml 1970-01-01 00:00:00 +0000
5+++ _integration-tests/data/snaps/basic-framework/meta/package.yaml 2015-10-14 22:56:54 +0000
6@@ -0,0 +1,5 @@
7+name: basic-framework
8+version: 1.0
9+vendor: Snappy Developers <snappy-devel@lists.ubuntu.com>
10+icon: meta/snappy64.png
11+type: framework
12
13=== added file '_integration-tests/data/snaps/basic-framework/meta/readme.md'
14--- _integration-tests/data/snaps/basic-framework/meta/readme.md 1970-01-01 00:00:00 +0000
15+++ _integration-tests/data/snaps/basic-framework/meta/readme.md 2015-10-14 22:56:54 +0000
16@@ -0,0 +1,3 @@
17+Basic framework snap
18+
19+A basic buildable framework snap
20
21=== added file '_integration-tests/data/snaps/basic-framework/meta/snappy64.png'
22Binary 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
23=== modified file '_integration-tests/tests/installApp_test.go'
24--- _integration-tests/tests/installApp_test.go 2015-10-13 15:56:03 +0000
25+++ _integration-tests/tests/installApp_test.go 2015-10-14 22:56:54 +0000
26@@ -20,6 +20,7 @@
27 package tests
28
29 import (
30+ "fmt"
31 "os"
32 "os/exec"
33
34@@ -38,16 +39,18 @@
35 }
36
37 func (s *installAppSuite) TestInstallAppMustPrintPackageInformation(c *check.C) {
38- installOutput := common.InstallSnap(c, "hello-world")
39- s.AddCleanup(func() {
40- common.RemoveSnap(c, "hello-world")
41- })
42+ snapPath, err := build.LocalSnap(c, data.BasicSnapName)
43+ defer os.Remove(snapPath)
44+ c.Assert(err, check.IsNil)
45+ installOutput := common.InstallSnap(c, snapPath)
46+ defer common.RemoveSnap(c, data.BasicSnapName)
47
48 expected := "(?ms)" +
49- "Installing hello-world\n" +
50+ fmt.Sprintf("Installing %s\n", snapPath) +
51+ ".*Signature check failed, but installing anyway as requested\n" +
52 "Name +Date +Version +Developer \n" +
53 ".*" +
54- "^hello-world +.* +.* +canonical \n" +
55+ "^basic +.* +.* +sideload *\n" +
56 ".*"
57
58 c.Assert(installOutput, check.Matches, expected)
59
60=== modified file '_integration-tests/tests/installFramework_test.go'
61--- _integration-tests/tests/installFramework_test.go 2015-10-08 06:53:50 +0000
62+++ _integration-tests/tests/installFramework_test.go 2015-10-14 22:56:54 +0000
63@@ -20,7 +20,12 @@
64 package tests
65
66 import (
67+ "fmt"
68+ "os"
69+
70+ "launchpad.net/snappy/_integration-tests/testutils/build"
71 "launchpad.net/snappy/_integration-tests/testutils/common"
72+ "launchpad.net/snappy/_integration-tests/testutils/data"
73
74 "gopkg.in/check.v1"
75 )
76@@ -32,14 +37,18 @@
77 }
78
79 func (s *installFrameworkSuite) TestInstallFrameworkMustPrintPackageInformation(c *check.C) {
80- installOutput := common.InstallSnap(c, "hello-dbus-fwk.canonical")
81- defer common.RemoveSnap(c, "hello-dbus-fwk.canonical")
82+ snapPath, err := build.LocalSnap(c, data.BasicFrameworkSnapName)
83+ defer os.Remove(snapPath)
84+ c.Assert(err, check.IsNil)
85+ installOutput := common.InstallSnap(c, snapPath)
86+ defer common.RemoveSnap(c, data.BasicFrameworkSnapName)
87
88 expected := "(?ms)" +
89- "Installing hello-dbus-fwk.canonical\n" +
90+ fmt.Sprintf("Installing %s\n", snapPath) +
91+ ".*Signature check failed, but installing anyway as requested\n" +
92 "Name +Date +Version +Developer \n" +
93 ".*" +
94- "^hello-dbus-fwk +.* +.* +canonical \n" +
95+ "^basic-framework +.* +.* +sideload *\n" +
96 ".*"
97
98 c.Assert(installOutput, check.Matches, expected)
99
100=== modified file '_integration-tests/testutils/data/data.go'
101--- _integration-tests/testutils/data/data.go 2015-10-13 13:53:48 +0000
102+++ _integration-tests/testutils/data/data.go 2015-10-14 22:56:54 +0000
103@@ -26,6 +26,8 @@
104 BasicSnapName = "basic"
105 // BasicBinariesSnapName is the name of the basic snap with binaries
106 BasicBinariesSnapName = "basic-binaries"
107+ // BasicFrameworkSnapName is the name of the basic framework snap
108+ BasicFrameworkSnapName = "basic-framework"
109 // WrongYamlSnapName is the name of a snap with an invalid meta yaml
110 WrongYamlSnapName = "wrong-yaml"
111 // MissingReadmeSnapName is the name of a snap without readme

Subscribers

People subscribed via source and target branches