Merge lp:~elopio/snappy/15.04_to_rolling-3 into lp:~snappy-dev/snappy/snappy-moved-to-github
- 15.04_to_rolling-3
- Merge into snappy-moved-to-github
Proposed by
Leo Arias
Status: | Superseded |
---|---|
Proposed branch: | lp:~elopio/snappy/15.04_to_rolling-3 |
Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
Prerequisite: | lp:~elopio/snappy/test_go_info |
Diff against target: |
396 lines (+244/-18) (has conflicts) 5 files modified
_integration-tests/main.go (+74/-6) _integration-tests/tests/common/common.go (+90/-10) _integration-tests/tests/latest/info_test.go (+74/-0) _integration-tests/tests/update/update_test.go (+1/-1) run-checks (+5/-1) Text conflict in _integration-tests/main.go Text conflict in _integration-tests/tests/common/common.go Text conflict in _integration-tests/tests/latest/info_test.go |
To merge this branch: | bzr merge lp:~elopio/snappy/15.04_to_rolling-3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Snappy Developers | Pending | ||
Review via email: mp+264938@code.launchpad.net |
This proposal supersedes a proposal from 2015-07-15.
This proposal has been superseded by a proposal from 2015-07-16.
Commit message
Description of the change
To post a comment you must log in.
- 588. By Leo Arias
-
Fixed the regexps.
- 589. By Leo Arias
-
Various fixes.
- 590. By Leo Arias
-
Updated comments and logs.
- 591. By Leo Arias
-
Merge
- 592. By Leo Arias
-
Better not replace the version yet.
- 593. By Leo Arias
-
Reverted the last change.
- 594. By Leo Arias
-
Only execute the setup if there is no reboot in progress.
- 595. By Leo Arias
-
Added a comment to Config.
- 596. By Leo Arias
-
Use the installed snappy for the update.
- 597. By Leo Arias
-
Moved the update tests to the latest package.
- 598. By Leo Arias
-
Renamed the latest package to cmd.
- 599. By Leo Arias
-
Added the isInRebootProcess method.
- 600. By Leo Arias
-
Use a map for the regex.
- 601. By Leo Arias
-
Moved the examples from run-checks to the README.
- 602. By Leo Arias
-
Merged with trunk.
- 603. By Leo Arias
-
Renamed the packages.
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '_integration-tests/main.go' | |||
2 | --- _integration-tests/main.go 2015-07-15 15:53:51 +0000 | |||
3 | +++ _integration-tests/main.go 2015-07-16 00:24:47 +0000 | |||
4 | @@ -64,6 +64,7 @@ | |||
5 | 64 | buildSnappyCLI(arch) | 64 | buildSnappyCLI(arch) |
6 | 65 | } | 65 | } |
7 | 66 | buildTests(arch) | 66 | buildTests(arch) |
8 | 67 | <<<<<<< TREE | ||
9 | 67 | } | 68 | } |
10 | 68 | 69 | ||
11 | 69 | func writeTestConfig(release, channel string) { | 70 | func writeTestConfig(release, channel string) { |
12 | @@ -88,6 +89,38 @@ | |||
13 | 88 | 89 | ||
14 | 89 | // Run the tests on the latest rolling edge image. | 90 | // Run the tests on the latest rolling edge image. |
15 | 90 | if imageName, err := img.UdfCreate(); err == nil { | 91 | if imageName, err := img.UdfCreate(); err == nil { |
16 | 92 | ======= | ||
17 | 93 | } | ||
18 | 94 | |||
19 | 95 | func writeTestConfig(release, channel, targetRelease, targetChannel string) { | ||
20 | 96 | fmt.Println("Writing test config...") | ||
21 | 97 | testConfig := map[string]string{ | ||
22 | 98 | "release": release, | ||
23 | 99 | "channel": channel, | ||
24 | 100 | } | ||
25 | 101 | if targetRelease != "" { | ||
26 | 102 | testConfig["targetRelease"] = targetRelease | ||
27 | 103 | } | ||
28 | 104 | if targetChannel != "" { | ||
29 | 105 | testConfig["targetChannel"] = targetChannel | ||
30 | 106 | } | ||
31 | 107 | fmt.Println(testConfig) | ||
32 | 108 | encoded, err := json.Marshal(testConfig) | ||
33 | 109 | if err != nil { | ||
34 | 110 | log.Fatalf("Error encoding the test config: %v", testConfig) | ||
35 | 111 | } | ||
36 | 112 | ioutil.WriteFile(configFileName, encoded, 0644) | ||
37 | 113 | } | ||
38 | 114 | |||
39 | 115 | func setupAndRunLocalTests(rootPath, testFilter string, img image.Image) { | ||
40 | 116 | var includeShell bool | ||
41 | 117 | if testFilter == "" { | ||
42 | 118 | includeShell = true | ||
43 | 119 | } | ||
44 | 120 | |||
45 | 121 | // Run the tests on the latest rolling edge image. | ||
46 | 122 | if imageName, err := img.UdfCreate(); err == nil { | ||
47 | 123 | >>>>>>> MERGE-SOURCE | ||
48 | 91 | adtRun(rootPath, testFilter, testPackages, | 124 | adtRun(rootPath, testFilter, testPackages, |
49 | 92 | kvmSSHOptions(imageName), includeShell) | 125 | kvmSSHOptions(imageName), includeShell) |
50 | 93 | } | 126 | } |
51 | @@ -228,16 +261,30 @@ | |||
52 | 228 | "SSH port of the testbed. Defaults to use port "+strconv.Itoa(defaultSSHPort)) | 261 | "SSH port of the testbed. Defaults to use port "+strconv.Itoa(defaultSSHPort)) |
53 | 229 | testFilter = flag.String("filter", "", | 262 | testFilter = flag.String("filter", "", |
54 | 230 | "Suites or tests to run, for instance MyTestSuite, MyTestSuite.FirstCustomTest or MyTestSuite.*CustomTest") | 263 | "Suites or tests to run, for instance MyTestSuite, MyTestSuite.FirstCustomTest or MyTestSuite.*CustomTest") |
61 | 231 | imgRelease = flag.String("release", defaultRelease, | 264 | <<<<<<< TREE |
62 | 232 | "Release of the image to be built, defaults to "+defaultRelease) | 265 | imgRelease = flag.String("release", defaultRelease, |
63 | 233 | imgChannel = flag.String("channel", defaultChannel, | 266 | "Release of the image to be built, defaults to "+defaultRelease) |
64 | 234 | "Channel of the image to be built, defaults to "+defaultChannel) | 267 | imgChannel = flag.String("channel", defaultChannel, |
65 | 235 | imgRevision = flag.String("revision", "", | 268 | "Channel of the image to be built, defaults to "+defaultChannel) |
66 | 236 | "Revision of the image to be built (can be relative to the latest available revision in the given release and channel as in -1), defaults to the empty string") | 269 | imgRevision = flag.String("revision", "", |
67 | 270 | "Revision of the image to be built (can be relative to the latest available revision in the given release and channel as in -1), defaults to the empty string") | ||
68 | 271 | ======= | ||
69 | 272 | imgRelease = flag.String("release", defaultRelease, | ||
70 | 273 | "Release of the image to be built, defaults to "+defaultRelease) | ||
71 | 274 | imgChannel = flag.String("channel", defaultChannel, | ||
72 | 275 | "Channel of the image to be built, defaults to "+defaultChannel) | ||
73 | 276 | imgRevision = flag.String("revision", "", | ||
74 | 277 | "Revision of the image to be built (can be relative to the latest available revision in the given release and channel as in -1), defaults to the empty string") | ||
75 | 278 | targetRelease = flag.String("target-release", "", | ||
76 | 279 | "If specified, the image will be updated to this release before running the tests.") | ||
77 | 280 | targetChannel = flag.String("target-channel", "", | ||
78 | 281 | "If specified, the image will be updated to this channel before running the tests.") | ||
79 | 282 | >>>>>>> MERGE-SOURCE | ||
80 | 237 | ) | 283 | ) |
81 | 238 | 284 | ||
82 | 239 | flag.Parse() | 285 | flag.Parse() |
83 | 240 | 286 | ||
84 | 287 | <<<<<<< TREE | ||
85 | 241 | buildAssets(*useSnappyFromBranch, *arch) | 288 | buildAssets(*useSnappyFromBranch, *arch) |
86 | 242 | 289 | ||
87 | 243 | // TODO: generate the files out of the source tree. --elopio - 2015-07-15 | 290 | // TODO: generate the files out of the source tree. --elopio - 2015-07-15 |
88 | @@ -257,4 +304,25 @@ | |||
89 | 257 | } else { | 304 | } else { |
90 | 258 | setupAndRunRemoteTests(rootPath, *testFilter, *testbedIP, *testbedPort) | 305 | setupAndRunRemoteTests(rootPath, *testFilter, *testbedIP, *testbedPort) |
91 | 259 | } | 306 | } |
92 | 307 | ======= | ||
93 | 308 | buildAssets(*useSnappyFromBranch, *arch) | ||
94 | 309 | |||
95 | 310 | // TODO: generate the files out of the source tree. --elopio - 2015-07-15 | ||
96 | 311 | utils.PrepareTargetDir(dataOutputDir) | ||
97 | 312 | defer os.RemoveAll(dataOutputDir) | ||
98 | 313 | |||
99 | 314 | // TODO: pass the config as arguments to the test binaries. | ||
100 | 315 | // --elopio - 2015-07-15 | ||
101 | 316 | writeTestConfig(*imgRelease, *imgChannel, *targetRelease, *targetChannel) | ||
102 | 317 | |||
103 | 318 | rootPath := getRootPath() | ||
104 | 319 | |||
105 | 320 | if *testbedIP == "" { | ||
106 | 321 | img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, baseDir) | ||
107 | 322 | setupAndRunLocalTests(rootPath, *testFilter, *img) | ||
108 | 323 | |||
109 | 324 | } else { | ||
110 | 325 | setupAndRunRemoteTests(rootPath, *testFilter, *testbedIP, *testbedPort) | ||
111 | 326 | } | ||
112 | 327 | >>>>>>> MERGE-SOURCE | ||
113 | 260 | } | 328 | } |
114 | 261 | 329 | ||
115 | === modified file '_integration-tests/tests/common/common.go' | |||
116 | --- _integration-tests/tests/common/common.go 2015-07-16 00:12:27 +0000 | |||
117 | +++ _integration-tests/tests/common/common.go 2015-07-16 00:24:47 +0000 | |||
118 | @@ -20,6 +20,7 @@ | |||
119 | 20 | package common | 20 | package common |
120 | 21 | 21 | ||
121 | 22 | import ( | 22 | import ( |
122 | 23 | "encoding/json" | ||
123 | 23 | "fmt" | 24 | "fmt" |
124 | 24 | "io/ioutil" | 25 | "io/ioutil" |
125 | 25 | "os" | 26 | "os" |
126 | @@ -39,6 +40,8 @@ | |||
127 | 39 | channelCfgFile = "/etc/system-image/channel.ini" | 40 | channelCfgFile = "/etc/system-image/channel.ini" |
128 | 40 | ) | 41 | ) |
129 | 41 | 42 | ||
130 | 43 | var Config map[string]string | ||
131 | 44 | |||
132 | 42 | // SnappySuite is a structure used as a base test suite for all the snappy | 45 | // SnappySuite is a structure used as a base test suite for all the snappy |
133 | 43 | // integration tests. | 46 | // integration tests. |
134 | 44 | type SnappySuite struct { | 47 | type SnappySuite struct { |
135 | @@ -50,6 +53,19 @@ | |||
136 | 50 | func (s *SnappySuite) SetUpSuite(c *check.C) { | 53 | func (s *SnappySuite) SetUpSuite(c *check.C) { |
137 | 51 | ExecCommand(c, "sudo", "systemctl", "stop", "snappy-autopilot.timer") | 54 | ExecCommand(c, "sudo", "systemctl", "stop", "snappy-autopilot.timer") |
138 | 52 | ExecCommand(c, "sudo", "systemctl", "disable", "snappy-autopilot.timer") | 55 | ExecCommand(c, "sudo", "systemctl", "disable", "snappy-autopilot.timer") |
139 | 56 | if CheckRebootMark("") { | ||
140 | 57 | Config = readConfig(c) | ||
141 | 58 | targetRelease, _ := Config["targetRelease"] | ||
142 | 59 | targetChannel, _ := Config["targetChannel"] | ||
143 | 60 | if targetRelease != "" || targetChannel != "" { | ||
144 | 61 | switchSystemImageConf(c, targetRelease, targetChannel, "0") | ||
145 | 62 | if CallUpdate(c) { | ||
146 | 63 | RebootWithMark(c, c.TestName()+"-setupsuite-update") | ||
147 | 64 | } | ||
148 | 65 | } | ||
149 | 66 | } else if CheckRebootMark(c.TestName() + "-setupsuite-update") { | ||
150 | 67 | RemoveRebootMark(c) | ||
151 | 68 | } | ||
152 | 53 | } | 69 | } |
153 | 54 | 70 | ||
154 | 55 | // SetUpTest handles reboots and stores version information. It will run before | 71 | // SetUpTest handles reboots and stores version information. It will run before |
155 | @@ -112,6 +128,59 @@ | |||
156 | 112 | s.cleanupHandlers = append(s.cleanupHandlers, f) | 128 | s.cleanupHandlers = append(s.cleanupHandlers, f) |
157 | 113 | } | 129 | } |
158 | 114 | 130 | ||
159 | 131 | func readConfig(c *check.C) map[string]string { | ||
160 | 132 | b, err := ioutil.ReadFile("_integration-tests/data/output/testconfig.json") | ||
161 | 133 | c.Assert( | ||
162 | 134 | err, check.IsNil, check.Commentf("Failed to read test config: %v", err)) | ||
163 | 135 | |||
164 | 136 | var decoded map[string]string | ||
165 | 137 | err = json.Unmarshal(b, &decoded) | ||
166 | 138 | c.Assert( | ||
167 | 139 | err, check.IsNil, check.Commentf("Failed to decode test config: %v", err)) | ||
168 | 140 | return decoded | ||
169 | 141 | } | ||
170 | 142 | |||
171 | 143 | func switchSystemImageConf(c *check.C, release, channel, version string) { | ||
172 | 144 | targets := []string{"/", BaseOtherPath} | ||
173 | 145 | for _, target := range targets { | ||
174 | 146 | file := filepath.Join(target, channelCfgFile) | ||
175 | 147 | if _, err := os.Stat(file); err == nil { | ||
176 | 148 | MakeWritable(c, target) | ||
177 | 149 | defer MakeReadonly(c, target) | ||
178 | 150 | replaceSystemImageValues(c, file, release, channel, version) | ||
179 | 151 | } | ||
180 | 152 | } | ||
181 | 153 | } | ||
182 | 154 | |||
183 | 155 | func replaceSystemImageValues(c *check.C, file, release, channel, version string) { | ||
184 | 156 | c.Log("Switching the system image conf...") | ||
185 | 157 | regex := []string{} | ||
186 | 158 | if release != "" { | ||
187 | 159 | regex = append(regex, | ||
188 | 160 | fmt.Sprintf( | ||
189 | 161 | `s#channel: ubuntu-core/.*/\(.*\)#channel: ubuntu-core/%s/\1#`, | ||
190 | 162 | release)) | ||
191 | 163 | } | ||
192 | 164 | if channel != "" { | ||
193 | 165 | regex = append(regex, | ||
194 | 166 | fmt.Sprintf( | ||
195 | 167 | `s#channel: ubuntu-core/\(.*\)/.*#channel: ubuntu-core/\1/%s#`, | ||
196 | 168 | channel)) | ||
197 | 169 | } | ||
198 | 170 | if version != "" { | ||
199 | 171 | regex = append(regex, | ||
200 | 172 | fmt.Sprintf( | ||
201 | 173 | `s/build_number: .*/build_number: %s/`, | ||
202 | 174 | version)) | ||
203 | 175 | } | ||
204 | 176 | for i := range regex { | ||
205 | 177 | ExecCommand(c, | ||
206 | 178 | "sudo", "sed", "-i", regex[i], file) | ||
207 | 179 | } | ||
208 | 180 | // Leave the new file in the test log. | ||
209 | 181 | ExecCommand(c, "cat", file) | ||
210 | 182 | } | ||
211 | 183 | |||
212 | 115 | func channelCfgBackupFile() string { | 184 | func channelCfgBackupFile() string { |
213 | 116 | return filepath.Join(os.Getenv("ADT_ARTIFACTS"), "channel.ini") | 185 | return filepath.Join(os.Getenv("ADT_ARTIFACTS"), "channel.ini") |
214 | 117 | } | 186 | } |
215 | @@ -168,17 +237,28 @@ | |||
216 | 168 | return version | 237 | return version |
217 | 169 | } | 238 | } |
218 | 170 | 239 | ||
222 | 171 | // CallUpdate executes an snappy update. If there is no update available, the | 240 | // CallUpdate executes an snappy update. It returns true if an update was |
223 | 172 | // channel version will be modified to fake an update. | 241 | // installed and it is waiting for a reboot to be activated. |
224 | 173 | func CallUpdate(c *check.C) { | 242 | func CallUpdate(c *check.C) bool { |
225 | 174 | c.Log("Calling snappy update...") | 243 | c.Log("Calling snappy update...") |
226 | 175 | output := ExecCommand(c, "sudo", "snappy", "update") | 244 | output := ExecCommand(c, "sudo", "snappy", "update") |
227 | 176 | // XXX Instead of trying the update, we should have a command to tell us | 245 | // XXX Instead of trying the update, we should have a command to tell us |
228 | 177 | // if there is an available update. --elopio - 2015-07-01 | 246 | // if there is an available update. --elopio - 2015-07-01 |
229 | 247 | <<<<<<< TREE | ||
230 | 178 | if output == "" { | 248 | if output == "" { |
231 | 179 | c.Log("There is no update available.") | 249 | c.Log("There is no update available.") |
232 | 180 | CallFakeUpdate(c) | 250 | CallFakeUpdate(c) |
233 | 181 | } | 251 | } |
234 | 252 | ======= | ||
235 | 253 | return output != "" | ||
236 | 254 | } | ||
237 | 255 | |||
238 | 256 | // CallFakeUpdate calls snappy update after faking the current version | ||
239 | 257 | func CallFakeUpdate(c *check.C) { | ||
240 | 258 | c.Log("Preparing fake and calling update.") | ||
241 | 259 | fakeAvailableUpdate(c) | ||
242 | 260 | ExecCommand(c, "sudo", "snappy", "update") | ||
243 | 261 | >>>>>>> MERGE-SOURCE | ||
244 | 182 | } | 262 | } |
245 | 183 | 263 | ||
246 | 184 | // CallFakeUpdate calls snappy update after faking the current version | 264 | // CallFakeUpdate calls snappy update after faking the current version |
247 | @@ -190,12 +270,17 @@ | |||
248 | 190 | 270 | ||
249 | 191 | func fakeAvailableUpdate(c *check.C) { | 271 | func fakeAvailableUpdate(c *check.C) { |
250 | 192 | c.Log("Faking an available update...") | 272 | c.Log("Faking an available update...") |
251 | 273 | <<<<<<< TREE | ||
252 | 193 | currentVersion := GetCurrentUbuntuCoreVersion(c) | 274 | currentVersion := GetCurrentUbuntuCoreVersion(c) |
253 | 194 | switchChannelVersion(c, currentVersion, currentVersion-1) | 275 | switchChannelVersion(c, currentVersion, currentVersion-1) |
254 | 276 | ======= | ||
255 | 277 | currentVersion := GetCurrentUbuntuCoreVersion(c) | ||
256 | 278 | switchChannelVersionWithBackup(c, currentVersion-1) | ||
257 | 279 | >>>>>>> MERGE-SOURCE | ||
258 | 195 | SetSavedVersion(c, currentVersion-1) | 280 | SetSavedVersion(c, currentVersion-1) |
259 | 196 | } | 281 | } |
260 | 197 | 282 | ||
262 | 198 | func switchChannelVersion(c *check.C, oldVersion, newVersion int) { | 283 | func switchChannelVersionWithBackup(c *check.C, newVersion int) { |
263 | 199 | m := make(map[string]string) | 284 | m := make(map[string]string) |
264 | 200 | m["/"] = channelCfgBackupFile() | 285 | m["/"] = channelCfgBackupFile() |
265 | 201 | m[BaseOtherPath] = channelCfgOtherBackupFile() | 286 | m[BaseOtherPath] = channelCfgOtherBackupFile() |
266 | @@ -206,12 +291,7 @@ | |||
267 | 206 | defer MakeReadonly(c, target) | 291 | defer MakeReadonly(c, target) |
268 | 207 | // Back up the file. It will be restored during the test tear down. | 292 | // Back up the file. It will be restored during the test tear down. |
269 | 208 | ExecCommand(c, "cp", file, backup) | 293 | ExecCommand(c, "cp", file, backup) |
276 | 209 | ExecCommand(c, | 294 | replaceSystemImageValues(c, file, "", "", strconv.Itoa(newVersion)) |
271 | 210 | "sudo", "sed", "-i", | ||
272 | 211 | fmt.Sprintf( | ||
273 | 212 | "s/build_number: %d/build_number: %d/g", | ||
274 | 213 | oldVersion, newVersion), | ||
275 | 214 | file) | ||
277 | 215 | } | 295 | } |
278 | 216 | } | 296 | } |
279 | 217 | } | 297 | } |
280 | 218 | 298 | ||
281 | === modified file '_integration-tests/tests/latest/info_test.go' | |||
282 | --- _integration-tests/tests/latest/info_test.go 2015-07-15 15:18:22 +0000 | |||
283 | +++ _integration-tests/tests/latest/info_test.go 2015-07-16 00:24:47 +0000 | |||
284 | @@ -1,3 +1,4 @@ | |||
285 | 1 | <<<<<<< TREE | ||
286 | 1 | // -*- Mode: Go; indent-tabs-mode: t -*- | 2 | // -*- Mode: Go; indent-tabs-mode: t -*- |
287 | 2 | 3 | ||
288 | 3 | /* | 4 | /* |
289 | @@ -84,3 +85,76 @@ | |||
290 | 84 | ".*" | 85 | ".*" |
291 | 85 | c.Assert(infoOutput, check.Matches, expected) | 86 | c.Assert(infoOutput, check.Matches, expected) |
292 | 86 | } | 87 | } |
293 | 88 | ======= | ||
294 | 89 | // -*- Mode: Go; indent-tabs-mode: t -*- | ||
295 | 90 | |||
296 | 91 | /* | ||
297 | 92 | * Copyright (C) 2015 Canonical Ltd | ||
298 | 93 | * | ||
299 | 94 | * This program is free software: you can redistribute it and/or modify | ||
300 | 95 | * it under the terms of the GNU General Public License version 3 as | ||
301 | 96 | * published by the Free Software Foundation. | ||
302 | 97 | * | ||
303 | 98 | * This program is distributed in the hope that it will be useful, | ||
304 | 99 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
305 | 100 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
306 | 101 | * GNU General Public License for more details. | ||
307 | 102 | * | ||
308 | 103 | * You should have received a copy of the GNU General Public License | ||
309 | 104 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
310 | 105 | * | ||
311 | 106 | */ | ||
312 | 107 | |||
313 | 108 | package latest | ||
314 | 109 | |||
315 | 110 | import ( | ||
316 | 111 | "fmt" | ||
317 | 112 | |||
318 | 113 | . "../common" | ||
319 | 114 | |||
320 | 115 | check "gopkg.in/check.v1" | ||
321 | 116 | ) | ||
322 | 117 | |||
323 | 118 | var _ = check.Suite(&infoSuite{}) | ||
324 | 119 | |||
325 | 120 | type infoSuite struct { | ||
326 | 121 | SnappySuite | ||
327 | 122 | } | ||
328 | 123 | |||
329 | 124 | func (s *infoSuite) TestInfoMustPrintReleaseAndChannel(c *check.C) { | ||
330 | 125 | infoOutput := ExecCommand(c, "snappy", "info") | ||
331 | 126 | |||
332 | 127 | expected := "(?ms)" + | ||
333 | 128 | fmt.Sprintf("^release: ubuntu-core/%s/%s\n", Config["release"], Config["channel"]) + | ||
334 | 129 | ".*" | ||
335 | 130 | |||
336 | 131 | c.Assert(infoOutput, check.Matches, expected) | ||
337 | 132 | } | ||
338 | 133 | |||
339 | 134 | func (s *infoSuite) TestInfoMustPrintInstalledApps(c *check.C) { | ||
340 | 135 | InstallSnap(c, "hello-world") | ||
341 | 136 | s.AddCleanup(func() { | ||
342 | 137 | RemoveSnap(c, "hello-world") | ||
343 | 138 | }) | ||
344 | 139 | infoOutput := ExecCommand(c, "snappy", "info") | ||
345 | 140 | |||
346 | 141 | expected := "(?ms)" + | ||
347 | 142 | ".*" + | ||
348 | 143 | "^apps: .*hello-world.*\n" | ||
349 | 144 | c.Assert(infoOutput, check.Matches, expected) | ||
350 | 145 | } | ||
351 | 146 | |||
352 | 147 | func (s *infoSuite) TestInfoMustPrintInstalledFrameworks(c *check.C) { | ||
353 | 148 | InstallSnap(c, "hello-dbus-fwk.canonical") | ||
354 | 149 | s.AddCleanup(func() { | ||
355 | 150 | RemoveSnap(c, "hello-dbus-fwk.canonical") | ||
356 | 151 | }) | ||
357 | 152 | infoOutput := ExecCommand(c, "snappy", "info") | ||
358 | 153 | |||
359 | 154 | expected := "(?ms)" + | ||
360 | 155 | ".*" + | ||
361 | 156 | "^frameworks: .*hello-dbus-fwk.*\n" + | ||
362 | 157 | ".*" | ||
363 | 158 | c.Assert(infoOutput, check.Matches, expected) | ||
364 | 159 | } | ||
365 | 160 | >>>>>>> MERGE-SOURCE | ||
366 | 87 | 161 | ||
367 | === modified file '_integration-tests/tests/update/update_test.go' | |||
368 | --- _integration-tests/tests/update/update_test.go 2015-07-14 15:16:59 +0000 | |||
369 | +++ _integration-tests/tests/update/update_test.go 2015-07-16 00:24:47 +0000 | |||
370 | @@ -41,7 +41,7 @@ | |||
371 | 41 | // be up-to-date after running this test. | 41 | // be up-to-date after running this test. |
372 | 42 | func (s *updateSuite) TestUpdateToSameReleaseAndChannel(c *C) { | 42 | func (s *updateSuite) TestUpdateToSameReleaseAndChannel(c *C) { |
373 | 43 | if BeforeReboot() { | 43 | if BeforeReboot() { |
375 | 44 | CallUpdate(c) | 44 | CallFakeUpdate(c) |
376 | 45 | Reboot(c) | 45 | Reboot(c) |
377 | 46 | } else if AfterReboot(c) { | 46 | } else if AfterReboot(c) { |
378 | 47 | RemoveRebootMark(c) | 47 | RemoveRebootMark(c) |
379 | 48 | 48 | ||
380 | === modified file 'run-checks' | |||
381 | --- run-checks 2015-07-08 15:50:31 +0000 | |||
382 | +++ run-checks 2015-07-16 00:24:47 +0000 | |||
383 | @@ -76,8 +76,12 @@ | |||
384 | 76 | 76 | ||
385 | 77 | # integration suite in kvm | 77 | # integration suite in kvm |
386 | 78 | if which adt-run >/dev/null 2>&1; then | 78 | if which adt-run >/dev/null 2>&1; then |
388 | 79 | echo "Running integration tests" | 79 | echo "Running integration tests on rolling edge" |
389 | 80 | go run _integration-tests/main.go --snappy-from-branch | 80 | go run _integration-tests/main.go --snappy-from-branch |
390 | 81 | echo "Update from rolling edge -1 and run the integration tests" | ||
391 | 82 | go run _integration-tests/main.go --snappy-from-branch --revision=-1 --target-release=rolling --target-channel=edge | ||
392 | 83 | echo "Update from 15.04 edge to rolling edge and run the integration tests" | ||
393 | 84 | go run _integration-tests/main.go --snappy-from-branch --release=15.04 --channel=edge --target-release=rolling --target-channel=edge | ||
394 | 81 | fi | 85 | fi |
395 | 82 | 86 | ||
396 | 83 | echo "All good, what could possibly go wrong" | 87 | echo "All good, what could possibly go wrong" |