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

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 620
Merged at revision: 616
Proposed branch: lp:~elopio/snappy/rename_helpers
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Prerequisite: lp:~elopio/snappy/extract_integration_adt-run
Diff against target: 381 lines (+39/-39)
21 files modified
_integration-tests/main.go (+7/-7)
_integration-tests/tests/apt_test.go (+1/-1)
_integration-tests/tests/build_test.go (+1/-1)
_integration-tests/tests/failover_rclocal_crash_test.go (+1/-1)
_integration-tests/tests/failover_systemd_loop_test.go (+1/-1)
_integration-tests/tests/failover_test.go (+1/-1)
_integration-tests/tests/failover_zero_size_file_test.go (+1/-1)
_integration-tests/tests/info_test.go (+1/-1)
_integration-tests/tests/installApp_test.go (+1/-1)
_integration-tests/tests/installFramework_test.go (+1/-1)
_integration-tests/tests/list_test.go (+1/-1)
_integration-tests/tests/rollback_test.go (+1/-1)
_integration-tests/tests/search_test.go (+1/-1)
_integration-tests/tests/update_test.go (+1/-1)
_integration-tests/tests/writablePaths_test.go (+1/-1)
_integration-tests/testutils/autopkgtest/autopkgtest.go (+6/-6)
_integration-tests/testutils/build/build.go (+3/-3)
_integration-tests/testutils/common/common.go (+1/-1)
_integration-tests/testutils/image/image.go (+3/-3)
_integration-tests/testutils/testutils.go (+1/-1)
run-checks (+4/-4)
To merge this branch: bzr merge lp:~elopio/snappy/rename_helpers
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+266056@code.launchpad.net

Commit message

Renamed the integration helpers package to testutils.

Description of the change

Sergio didn't like the name helpers. He suggested testutils instead.

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

Removed the spurious line.

619. By Leo Arias

Updated runchecks.

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

LGTM

review: Approve
lp:~elopio/snappy/rename_helpers updated
620. By Leo Arias

Merged with prerequisite.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory '_integration-tests/helpers/utils'
2=== modified file '_integration-tests/main.go'
3--- _integration-tests/main.go 2015-07-28 12:45:26 +0000
4+++ _integration-tests/main.go 2015-07-28 12:45:26 +0000
5@@ -25,11 +25,11 @@
6 "path/filepath"
7 "strconv"
8
9- "launchpad.net/snappy/_integration-tests/helpers/autopkgtest"
10- "launchpad.net/snappy/_integration-tests/helpers/build"
11- "launchpad.net/snappy/_integration-tests/helpers/config"
12- "launchpad.net/snappy/_integration-tests/helpers/image"
13- "launchpad.net/snappy/_integration-tests/helpers/utils"
14+ "launchpad.net/snappy/_integration-tests/testutils"
15+ "launchpad.net/snappy/_integration-tests/testutils/autopkgtest"
16+ "launchpad.net/snappy/_integration-tests/testutils/build"
17+ "launchpad.net/snappy/_integration-tests/testutils/config"
18+ "launchpad.net/snappy/_integration-tests/testutils/image"
19 )
20
21 const (
22@@ -75,7 +75,7 @@
23 build.Assets(*useSnappyFromBranch, *arch)
24
25 // TODO: generate the files out of the source tree. --elopio - 2015-07-15
26- utils.PrepareTargetDir(dataOutputDir)
27+ testutils.PrepareTargetDir(dataOutputDir)
28 defer os.RemoveAll(dataOutputDir)
29
30 // TODO: pass the config as arguments to the test binaries.
31@@ -85,7 +85,7 @@
32 *update, *rollback)
33 cfg.Write()
34
35- rootPath := utils.RootPath()
36+ rootPath := testutils.RootPath()
37
38 if *testbedIP == "" {
39 img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, baseDir)
40
41=== modified file '_integration-tests/tests/apt_test.go'
42--- _integration-tests/tests/apt_test.go 2015-07-22 18:13:22 +0000
43+++ _integration-tests/tests/apt_test.go 2015-07-28 12:45:26 +0000
44@@ -20,7 +20,7 @@
45 package tests
46
47 import (
48- . "launchpad.net/snappy/_integration-tests/helpers/common"
49+ . "launchpad.net/snappy/_integration-tests/testutils/common"
50
51 check "gopkg.in/check.v1"
52 )
53
54=== modified file '_integration-tests/tests/build_test.go'
55--- _integration-tests/tests/build_test.go 2015-07-22 18:13:22 +0000
56+++ _integration-tests/tests/build_test.go 2015-07-28 12:45:26 +0000
57@@ -24,7 +24,7 @@
58 "os"
59 "os/exec"
60
61- . "launchpad.net/snappy/_integration-tests/helpers/common"
62+ . "launchpad.net/snappy/_integration-tests/testutils/common"
63
64 . "gopkg.in/check.v1"
65 )
66
67=== modified file '_integration-tests/tests/failover_rclocal_crash_test.go'
68--- _integration-tests/tests/failover_rclocal_crash_test.go 2015-07-22 18:13:22 +0000
69+++ _integration-tests/tests/failover_rclocal_crash_test.go 2015-07-28 12:45:26 +0000
70@@ -22,7 +22,7 @@
71 import (
72 "fmt"
73
74- . "launchpad.net/snappy/_integration-tests/helpers/common"
75+ . "launchpad.net/snappy/_integration-tests/testutils/common"
76
77 check "gopkg.in/check.v1"
78 )
79
80=== modified file '_integration-tests/tests/failover_systemd_loop_test.go'
81--- _integration-tests/tests/failover_systemd_loop_test.go 2015-07-22 18:13:22 +0000
82+++ _integration-tests/tests/failover_systemd_loop_test.go 2015-07-28 12:45:26 +0000
83@@ -22,7 +22,7 @@
84 import (
85 "fmt"
86
87- . "launchpad.net/snappy/_integration-tests/helpers/common"
88+ . "launchpad.net/snappy/_integration-tests/testutils/common"
89
90 check "gopkg.in/check.v1"
91 )
92
93=== modified file '_integration-tests/tests/failover_test.go'
94--- _integration-tests/tests/failover_test.go 2015-07-22 18:13:22 +0000
95+++ _integration-tests/tests/failover_test.go 2015-07-28 12:45:26 +0000
96@@ -22,7 +22,7 @@
97 import (
98 check "gopkg.in/check.v1"
99
100- . "launchpad.net/snappy/_integration-tests/helpers/common"
101+ . "launchpad.net/snappy/_integration-tests/testutils/common"
102 )
103
104 var _ = check.Suite(&failoverSuite{})
105
106=== modified file '_integration-tests/tests/failover_zero_size_file_test.go'
107--- _integration-tests/tests/failover_zero_size_file_test.go 2015-07-22 18:13:22 +0000
108+++ _integration-tests/tests/failover_zero_size_file_test.go 2015-07-28 12:45:26 +0000
109@@ -25,7 +25,7 @@
110 "path/filepath"
111 "strings"
112
113- . "launchpad.net/snappy/_integration-tests/helpers/common"
114+ . "launchpad.net/snappy/_integration-tests/testutils/common"
115
116 check "gopkg.in/check.v1"
117 )
118
119=== modified file '_integration-tests/tests/info_test.go'
120--- _integration-tests/tests/info_test.go 2015-07-22 18:45:48 +0000
121+++ _integration-tests/tests/info_test.go 2015-07-28 12:45:26 +0000
122@@ -22,7 +22,7 @@
123 import (
124 "fmt"
125
126- . "launchpad.net/snappy/_integration-tests/helpers/common"
127+ . "launchpad.net/snappy/_integration-tests/testutils/common"
128
129 check "gopkg.in/check.v1"
130 )
131
132=== modified file '_integration-tests/tests/installApp_test.go'
133--- _integration-tests/tests/installApp_test.go 2015-07-22 18:13:22 +0000
134+++ _integration-tests/tests/installApp_test.go 2015-07-28 12:45:26 +0000
135@@ -24,7 +24,7 @@
136 "os/exec"
137 "time"
138
139- . "launchpad.net/snappy/_integration-tests/helpers/common"
140+ . "launchpad.net/snappy/_integration-tests/testutils/common"
141
142 check "gopkg.in/check.v1"
143 )
144
145=== modified file '_integration-tests/tests/installFramework_test.go'
146--- _integration-tests/tests/installFramework_test.go 2015-07-22 18:13:22 +0000
147+++ _integration-tests/tests/installFramework_test.go 2015-07-28 12:45:26 +0000
148@@ -23,7 +23,7 @@
149 "fmt"
150 "regexp"
151
152- . "launchpad.net/snappy/_integration-tests/helpers/common"
153+ . "launchpad.net/snappy/_integration-tests/testutils/common"
154
155 check "gopkg.in/check.v1"
156 )
157
158=== modified file '_integration-tests/tests/list_test.go'
159--- _integration-tests/tests/list_test.go 2015-07-22 18:13:22 +0000
160+++ _integration-tests/tests/list_test.go 2015-07-28 12:45:26 +0000
161@@ -23,7 +23,7 @@
162 "fmt"
163 "os"
164
165- . "launchpad.net/snappy/_integration-tests/helpers/common"
166+ . "launchpad.net/snappy/_integration-tests/testutils/common"
167
168 "github.com/mvo5/goconfigparser"
169 check "gopkg.in/check.v1"
170
171=== modified file '_integration-tests/tests/rollback_test.go'
172--- _integration-tests/tests/rollback_test.go 2015-07-22 18:13:22 +0000
173+++ _integration-tests/tests/rollback_test.go 2015-07-28 12:45:26 +0000
174@@ -22,7 +22,7 @@
175 import (
176 "strconv"
177
178- . "launchpad.net/snappy/_integration-tests/helpers/common"
179+ . "launchpad.net/snappy/_integration-tests/testutils/common"
180
181 check "gopkg.in/check.v1"
182 )
183
184=== modified file '_integration-tests/tests/search_test.go'
185--- _integration-tests/tests/search_test.go 2015-07-22 18:13:22 +0000
186+++ _integration-tests/tests/search_test.go 2015-07-28 12:45:26 +0000
187@@ -20,7 +20,7 @@
188 package tests
189
190 import (
191- . "launchpad.net/snappy/_integration-tests/helpers/common"
192+ . "launchpad.net/snappy/_integration-tests/testutils/common"
193
194 . "gopkg.in/check.v1"
195 )
196
197=== modified file '_integration-tests/tests/update_test.go'
198--- _integration-tests/tests/update_test.go 2015-07-27 14:31:28 +0000
199+++ _integration-tests/tests/update_test.go 2015-07-28 12:45:26 +0000
200@@ -20,7 +20,7 @@
201 package tests
202
203 import (
204- . "launchpad.net/snappy/_integration-tests/helpers/common"
205+ . "launchpad.net/snappy/_integration-tests/testutils/common"
206
207 check "gopkg.in/check.v1"
208 )
209
210=== modified file '_integration-tests/tests/writablePaths_test.go'
211--- _integration-tests/tests/writablePaths_test.go 2015-07-22 18:13:22 +0000
212+++ _integration-tests/tests/writablePaths_test.go 2015-07-28 12:45:26 +0000
213@@ -27,7 +27,7 @@
214 "path/filepath"
215 "strings"
216
217- . "launchpad.net/snappy/_integration-tests/helpers/common"
218+ . "launchpad.net/snappy/_integration-tests/testutils/common"
219
220 check "gopkg.in/check.v1"
221 )
222
223=== renamed directory '_integration-tests/helpers' => '_integration-tests/testutils'
224=== modified file '_integration-tests/testutils/autopkgtest/autopkgtest.go'
225--- _integration-tests/helpers/autopkgtest/autopkgtest.go 2015-07-28 12:45:26 +0000
226+++ _integration-tests/testutils/autopkgtest/autopkgtest.go 2015-07-28 12:45:26 +0000
227@@ -28,9 +28,9 @@
228
229 "log"
230
231- "launchpad.net/snappy/_integration-tests/helpers/build"
232- "launchpad.net/snappy/_integration-tests/helpers/image"
233- "launchpad.net/snappy/_integration-tests/helpers/utils"
234+ "launchpad.net/snappy/_integration-tests/testutils"
235+ "launchpad.net/snappy/_integration-tests/testutils/build"
236+ "launchpad.net/snappy/_integration-tests/testutils/image"
237 )
238
239 const (
240@@ -51,7 +51,7 @@
241
242 // AdtRunRemote runs the autopkgtests using a remote machine as the testbed.
243 func AdtRunRemote(rootPath, baseDir, testFilter, testbedIP string, testbedPort int) {
244- utils.ExecCommand("ssh-copy-id", "-p", strconv.Itoa(testbedPort),
245+ testutils.ExecCommand("ssh-copy-id", "-p", strconv.Itoa(testbedPort),
246 "ubuntu@"+testbedIP)
247 adtRun(
248 rootPath, baseDir, testFilter, remoteTestbedSSHOptions(testbedIP, testbedPort))
249@@ -62,7 +62,7 @@
250
251 fmt.Println("Calling adt-run...")
252 outputDir := filepath.Join(baseDir, "output")
253- utils.PrepareTargetDir(outputDir)
254+ testutils.PrepareTargetDir(outputDir)
255
256 cmd := []string{
257 "adt-run", "-B",
258@@ -71,7 +71,7 @@
259 "--built-tree", rootPath,
260 "--output-dir", outputDir}
261
262- utils.ExecCommand(append(cmd, testbedOptions...)...)
263+ testutils.ExecCommand(append(cmd, testbedOptions...)...)
264 }
265
266 func createControlFile(testFilter string) {
267
268=== modified file '_integration-tests/testutils/build/build.go'
269--- _integration-tests/helpers/build/build.go 2015-07-28 12:05:11 +0000
270+++ _integration-tests/testutils/build/build.go 2015-07-28 12:45:26 +0000
271@@ -23,7 +23,7 @@
272 "fmt"
273 "os"
274
275- "launchpad.net/snappy/_integration-tests/helpers/utils"
276+ "launchpad.net/snappy/_integration-tests/testutils"
277 )
278
279 const (
280@@ -36,7 +36,7 @@
281 // Assets builds the snappy and integration tests binaries for the target
282 // architecture.
283 func Assets(useSnappyFromBranch bool, arch string) {
284- utils.PrepareTargetDir(testsBinDir)
285+ testutils.PrepareTargetDir(testsBinDir)
286
287 if useSnappyFromBranch {
288 // FIXME We need to build an image that has the snappy from the branch
289@@ -72,5 +72,5 @@
290 }
291 }
292 goCmd := append([]string{"go"}, cmds...)
293- utils.ExecCommand(goCmd...)
294+ testutils.ExecCommand(goCmd...)
295 }
296
297=== modified file '_integration-tests/testutils/common/common.go'
298--- _integration-tests/helpers/common/common.go 2015-07-27 17:33:25 +0000
299+++ _integration-tests/testutils/common/common.go 2015-07-28 12:45:26 +0000
300@@ -31,7 +31,7 @@
301
302 check "gopkg.in/check.v1"
303
304- "launchpad.net/snappy/_integration-tests/helpers/config"
305+ "launchpad.net/snappy/_integration-tests/testutils/config"
306 )
307
308 const (
309
310=== modified file '_integration-tests/testutils/image/image.go'
311--- _integration-tests/helpers/image/image.go 2015-07-22 18:15:44 +0000
312+++ _integration-tests/testutils/image/image.go 2015-07-28 12:45:26 +0000
313@@ -24,7 +24,7 @@
314 "path/filepath"
315 "strings"
316
317- "launchpad.net/snappy/_integration-tests/helpers/utils"
318+ "launchpad.net/snappy/_integration-tests/testutils"
319 )
320
321 // Image type encapsulates image actions
322@@ -46,7 +46,7 @@
323
324 imageDir := filepath.Join(img.baseDir, "image")
325
326- utils.PrepareTargetDir(imageDir)
327+ testutils.PrepareTargetDir(imageDir)
328
329 udfCommand := []string{"sudo", "ubuntu-device-flash", "--verbose"}
330
331@@ -63,7 +63,7 @@
332 "--developer-mode",
333 }
334
335- err := utils.ExecCommand(append(udfCommand, coreOptions...)...)
336+ err := testutils.ExecCommand(append(udfCommand, coreOptions...)...)
337
338 return imagePath, err
339 }
340
341=== renamed file '_integration-tests/helpers/utils/utils.go' => '_integration-tests/testutils/testutils.go'
342--- _integration-tests/helpers/utils/utils.go 2015-07-28 12:45:26 +0000
343+++ _integration-tests/testutils/testutils.go 2015-07-28 12:45:26 +0000
344@@ -17,7 +17,7 @@
345 *
346 */
347
348-package utils
349+package testutils
350
351 import (
352 "fmt"
353
354=== modified file 'run-checks'
355--- run-checks 2015-07-23 13:32:15 +0000
356+++ run-checks 2015-07-28 12:45:26 +0000
357@@ -46,11 +46,11 @@
358 echo Running vet
359 go vet ./...
360 go vet ./_integration-tests/tests/...
361-go vet ./_integration-tests/helpers/...
362+go vet ./_integration-tests/testutils/...
363
364 # golint
365 echo Running lint
366-lint=$(golint ./... && golint ./_integration-tests/helpers/... && golint ./_integration-tests/tests/...)
367+lint=$(golint ./... && golint ./_integration-tests/testutils/... && golint ./_integration-tests/tests/...)
368 if [ -n "$lint" ]; then
369 echo "Lint complains:"
370 echo "$lint"
371@@ -72,8 +72,8 @@
372 go build _integration-tests/main.go
373
374 # the rabbit hole
375-echo Running the tests for the integration helpers
376-$goctest -v -cover ./_integration-tests/helpers/...
377+echo Running the tests for the integration testutils
378+$goctest -v -cover ./_integration-tests/testutils/...
379
380 # integration suite in kvm
381 if which adt-run >/dev/null 2>&1; then

Subscribers

People subscribed via source and target branches