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
=== removed directory '_integration-tests/helpers/utils'
=== modified file '_integration-tests/main.go'
--- _integration-tests/main.go 2015-07-28 12:45:26 +0000
+++ _integration-tests/main.go 2015-07-28 12:45:26 +0000
@@ -25,11 +25,11 @@
25 "path/filepath"25 "path/filepath"
26 "strconv"26 "strconv"
2727
28 "launchpad.net/snappy/_integration-tests/helpers/autopkgtest"28 "launchpad.net/snappy/_integration-tests/testutils"
29 "launchpad.net/snappy/_integration-tests/helpers/build"29 "launchpad.net/snappy/_integration-tests/testutils/autopkgtest"
30 "launchpad.net/snappy/_integration-tests/helpers/config"30 "launchpad.net/snappy/_integration-tests/testutils/build"
31 "launchpad.net/snappy/_integration-tests/helpers/image"31 "launchpad.net/snappy/_integration-tests/testutils/config"
32 "launchpad.net/snappy/_integration-tests/helpers/utils"32 "launchpad.net/snappy/_integration-tests/testutils/image"
33)33)
3434
35const (35const (
@@ -75,7 +75,7 @@
75 build.Assets(*useSnappyFromBranch, *arch)75 build.Assets(*useSnappyFromBranch, *arch)
7676
77 // TODO: generate the files out of the source tree. --elopio - 2015-07-1577 // TODO: generate the files out of the source tree. --elopio - 2015-07-15
78 utils.PrepareTargetDir(dataOutputDir)78 testutils.PrepareTargetDir(dataOutputDir)
79 defer os.RemoveAll(dataOutputDir)79 defer os.RemoveAll(dataOutputDir)
8080
81 // TODO: pass the config as arguments to the test binaries.81 // TODO: pass the config as arguments to the test binaries.
@@ -85,7 +85,7 @@
85 *update, *rollback)85 *update, *rollback)
86 cfg.Write()86 cfg.Write()
8787
88 rootPath := utils.RootPath()88 rootPath := testutils.RootPath()
8989
90 if *testbedIP == "" {90 if *testbedIP == "" {
91 img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, baseDir)91 img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, baseDir)
9292
=== modified file '_integration-tests/tests/apt_test.go'
--- _integration-tests/tests/apt_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/apt_test.go 2015-07-28 12:45:26 +0000
@@ -20,7 +20,7 @@
20package tests20package tests
2121
22import (22import (
23 . "launchpad.net/snappy/_integration-tests/helpers/common"23 . "launchpad.net/snappy/_integration-tests/testutils/common"
2424
25 check "gopkg.in/check.v1"25 check "gopkg.in/check.v1"
26)26)
2727
=== modified file '_integration-tests/tests/build_test.go'
--- _integration-tests/tests/build_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/build_test.go 2015-07-28 12:45:26 +0000
@@ -24,7 +24,7 @@
24 "os"24 "os"
25 "os/exec"25 "os/exec"
2626
27 . "launchpad.net/snappy/_integration-tests/helpers/common"27 . "launchpad.net/snappy/_integration-tests/testutils/common"
2828
29 . "gopkg.in/check.v1"29 . "gopkg.in/check.v1"
30)30)
3131
=== modified file '_integration-tests/tests/failover_rclocal_crash_test.go'
--- _integration-tests/tests/failover_rclocal_crash_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/failover_rclocal_crash_test.go 2015-07-28 12:45:26 +0000
@@ -22,7 +22,7 @@
22import (22import (
23 "fmt"23 "fmt"
2424
25 . "launchpad.net/snappy/_integration-tests/helpers/common"25 . "launchpad.net/snappy/_integration-tests/testutils/common"
2626
27 check "gopkg.in/check.v1"27 check "gopkg.in/check.v1"
28)28)
2929
=== modified file '_integration-tests/tests/failover_systemd_loop_test.go'
--- _integration-tests/tests/failover_systemd_loop_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/failover_systemd_loop_test.go 2015-07-28 12:45:26 +0000
@@ -22,7 +22,7 @@
22import (22import (
23 "fmt"23 "fmt"
2424
25 . "launchpad.net/snappy/_integration-tests/helpers/common"25 . "launchpad.net/snappy/_integration-tests/testutils/common"
2626
27 check "gopkg.in/check.v1"27 check "gopkg.in/check.v1"
28)28)
2929
=== modified file '_integration-tests/tests/failover_test.go'
--- _integration-tests/tests/failover_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/failover_test.go 2015-07-28 12:45:26 +0000
@@ -22,7 +22,7 @@
22import (22import (
23 check "gopkg.in/check.v1"23 check "gopkg.in/check.v1"
2424
25 . "launchpad.net/snappy/_integration-tests/helpers/common"25 . "launchpad.net/snappy/_integration-tests/testutils/common"
26)26)
2727
28var _ = check.Suite(&failoverSuite{})28var _ = check.Suite(&failoverSuite{})
2929
=== modified file '_integration-tests/tests/failover_zero_size_file_test.go'
--- _integration-tests/tests/failover_zero_size_file_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/failover_zero_size_file_test.go 2015-07-28 12:45:26 +0000
@@ -25,7 +25,7 @@
25 "path/filepath"25 "path/filepath"
26 "strings"26 "strings"
2727
28 . "launchpad.net/snappy/_integration-tests/helpers/common"28 . "launchpad.net/snappy/_integration-tests/testutils/common"
2929
30 check "gopkg.in/check.v1"30 check "gopkg.in/check.v1"
31)31)
3232
=== modified file '_integration-tests/tests/info_test.go'
--- _integration-tests/tests/info_test.go 2015-07-22 18:45:48 +0000
+++ _integration-tests/tests/info_test.go 2015-07-28 12:45:26 +0000
@@ -22,7 +22,7 @@
22import (22import (
23 "fmt"23 "fmt"
2424
25 . "launchpad.net/snappy/_integration-tests/helpers/common"25 . "launchpad.net/snappy/_integration-tests/testutils/common"
2626
27 check "gopkg.in/check.v1"27 check "gopkg.in/check.v1"
28)28)
2929
=== modified file '_integration-tests/tests/installApp_test.go'
--- _integration-tests/tests/installApp_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/installApp_test.go 2015-07-28 12:45:26 +0000
@@ -24,7 +24,7 @@
24 "os/exec"24 "os/exec"
25 "time"25 "time"
2626
27 . "launchpad.net/snappy/_integration-tests/helpers/common"27 . "launchpad.net/snappy/_integration-tests/testutils/common"
2828
29 check "gopkg.in/check.v1"29 check "gopkg.in/check.v1"
30)30)
3131
=== modified file '_integration-tests/tests/installFramework_test.go'
--- _integration-tests/tests/installFramework_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/installFramework_test.go 2015-07-28 12:45:26 +0000
@@ -23,7 +23,7 @@
23 "fmt"23 "fmt"
24 "regexp"24 "regexp"
2525
26 . "launchpad.net/snappy/_integration-tests/helpers/common"26 . "launchpad.net/snappy/_integration-tests/testutils/common"
2727
28 check "gopkg.in/check.v1"28 check "gopkg.in/check.v1"
29)29)
3030
=== modified file '_integration-tests/tests/list_test.go'
--- _integration-tests/tests/list_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/list_test.go 2015-07-28 12:45:26 +0000
@@ -23,7 +23,7 @@
23 "fmt"23 "fmt"
24 "os"24 "os"
2525
26 . "launchpad.net/snappy/_integration-tests/helpers/common"26 . "launchpad.net/snappy/_integration-tests/testutils/common"
2727
28 "github.com/mvo5/goconfigparser"28 "github.com/mvo5/goconfigparser"
29 check "gopkg.in/check.v1"29 check "gopkg.in/check.v1"
3030
=== modified file '_integration-tests/tests/rollback_test.go'
--- _integration-tests/tests/rollback_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/rollback_test.go 2015-07-28 12:45:26 +0000
@@ -22,7 +22,7 @@
22import (22import (
23 "strconv"23 "strconv"
2424
25 . "launchpad.net/snappy/_integration-tests/helpers/common"25 . "launchpad.net/snappy/_integration-tests/testutils/common"
2626
27 check "gopkg.in/check.v1"27 check "gopkg.in/check.v1"
28)28)
2929
=== modified file '_integration-tests/tests/search_test.go'
--- _integration-tests/tests/search_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/search_test.go 2015-07-28 12:45:26 +0000
@@ -20,7 +20,7 @@
20package tests20package tests
2121
22import (22import (
23 . "launchpad.net/snappy/_integration-tests/helpers/common"23 . "launchpad.net/snappy/_integration-tests/testutils/common"
2424
25 . "gopkg.in/check.v1"25 . "gopkg.in/check.v1"
26)26)
2727
=== modified file '_integration-tests/tests/update_test.go'
--- _integration-tests/tests/update_test.go 2015-07-27 14:31:28 +0000
+++ _integration-tests/tests/update_test.go 2015-07-28 12:45:26 +0000
@@ -20,7 +20,7 @@
20package tests20package tests
2121
22import (22import (
23 . "launchpad.net/snappy/_integration-tests/helpers/common"23 . "launchpad.net/snappy/_integration-tests/testutils/common"
2424
25 check "gopkg.in/check.v1"25 check "gopkg.in/check.v1"
26)26)
2727
=== modified file '_integration-tests/tests/writablePaths_test.go'
--- _integration-tests/tests/writablePaths_test.go 2015-07-22 18:13:22 +0000
+++ _integration-tests/tests/writablePaths_test.go 2015-07-28 12:45:26 +0000
@@ -27,7 +27,7 @@
27 "path/filepath"27 "path/filepath"
28 "strings"28 "strings"
2929
30 . "launchpad.net/snappy/_integration-tests/helpers/common"30 . "launchpad.net/snappy/_integration-tests/testutils/common"
3131
32 check "gopkg.in/check.v1"32 check "gopkg.in/check.v1"
33)33)
3434
=== renamed directory '_integration-tests/helpers' => '_integration-tests/testutils'
=== modified file '_integration-tests/testutils/autopkgtest/autopkgtest.go'
--- _integration-tests/helpers/autopkgtest/autopkgtest.go 2015-07-28 12:45:26 +0000
+++ _integration-tests/testutils/autopkgtest/autopkgtest.go 2015-07-28 12:45:26 +0000
@@ -28,9 +28,9 @@
2828
29 "log"29 "log"
3030
31 "launchpad.net/snappy/_integration-tests/helpers/build"31 "launchpad.net/snappy/_integration-tests/testutils"
32 "launchpad.net/snappy/_integration-tests/helpers/image"32 "launchpad.net/snappy/_integration-tests/testutils/build"
33 "launchpad.net/snappy/_integration-tests/helpers/utils"33 "launchpad.net/snappy/_integration-tests/testutils/image"
34)34)
3535
36const (36const (
@@ -51,7 +51,7 @@
5151
52// AdtRunRemote runs the autopkgtests using a remote machine as the testbed.52// AdtRunRemote runs the autopkgtests using a remote machine as the testbed.
53func AdtRunRemote(rootPath, baseDir, testFilter, testbedIP string, testbedPort int) {53func AdtRunRemote(rootPath, baseDir, testFilter, testbedIP string, testbedPort int) {
54 utils.ExecCommand("ssh-copy-id", "-p", strconv.Itoa(testbedPort),54 testutils.ExecCommand("ssh-copy-id", "-p", strconv.Itoa(testbedPort),
55 "ubuntu@"+testbedIP)55 "ubuntu@"+testbedIP)
56 adtRun(56 adtRun(
57 rootPath, baseDir, testFilter, remoteTestbedSSHOptions(testbedIP, testbedPort))57 rootPath, baseDir, testFilter, remoteTestbedSSHOptions(testbedIP, testbedPort))
@@ -62,7 +62,7 @@
6262
63 fmt.Println("Calling adt-run...")63 fmt.Println("Calling adt-run...")
64 outputDir := filepath.Join(baseDir, "output")64 outputDir := filepath.Join(baseDir, "output")
65 utils.PrepareTargetDir(outputDir)65 testutils.PrepareTargetDir(outputDir)
6666
67 cmd := []string{67 cmd := []string{
68 "adt-run", "-B",68 "adt-run", "-B",
@@ -71,7 +71,7 @@
71 "--built-tree", rootPath,71 "--built-tree", rootPath,
72 "--output-dir", outputDir}72 "--output-dir", outputDir}
7373
74 utils.ExecCommand(append(cmd, testbedOptions...)...)74 testutils.ExecCommand(append(cmd, testbedOptions...)...)
75}75}
7676
77func createControlFile(testFilter string) {77func createControlFile(testFilter string) {
7878
=== modified file '_integration-tests/testutils/build/build.go'
--- _integration-tests/helpers/build/build.go 2015-07-28 12:05:11 +0000
+++ _integration-tests/testutils/build/build.go 2015-07-28 12:45:26 +0000
@@ -23,7 +23,7 @@
23 "fmt"23 "fmt"
24 "os"24 "os"
2525
26 "launchpad.net/snappy/_integration-tests/helpers/utils"26 "launchpad.net/snappy/_integration-tests/testutils"
27)27)
2828
29const (29const (
@@ -36,7 +36,7 @@
36// Assets builds the snappy and integration tests binaries for the target36// Assets builds the snappy and integration tests binaries for the target
37// architecture.37// architecture.
38func Assets(useSnappyFromBranch bool, arch string) {38func Assets(useSnappyFromBranch bool, arch string) {
39 utils.PrepareTargetDir(testsBinDir)39 testutils.PrepareTargetDir(testsBinDir)
4040
41 if useSnappyFromBranch {41 if useSnappyFromBranch {
42 // FIXME We need to build an image that has the snappy from the branch42 // FIXME We need to build an image that has the snappy from the branch
@@ -72,5 +72,5 @@
72 }72 }
73 }73 }
74 goCmd := append([]string{"go"}, cmds...)74 goCmd := append([]string{"go"}, cmds...)
75 utils.ExecCommand(goCmd...)75 testutils.ExecCommand(goCmd...)
76}76}
7777
=== modified file '_integration-tests/testutils/common/common.go'
--- _integration-tests/helpers/common/common.go 2015-07-27 17:33:25 +0000
+++ _integration-tests/testutils/common/common.go 2015-07-28 12:45:26 +0000
@@ -31,7 +31,7 @@
3131
32 check "gopkg.in/check.v1"32 check "gopkg.in/check.v1"
3333
34 "launchpad.net/snappy/_integration-tests/helpers/config"34 "launchpad.net/snappy/_integration-tests/testutils/config"
35)35)
3636
37const (37const (
3838
=== modified file '_integration-tests/testutils/image/image.go'
--- _integration-tests/helpers/image/image.go 2015-07-22 18:15:44 +0000
+++ _integration-tests/testutils/image/image.go 2015-07-28 12:45:26 +0000
@@ -24,7 +24,7 @@
24 "path/filepath"24 "path/filepath"
25 "strings"25 "strings"
2626
27 "launchpad.net/snappy/_integration-tests/helpers/utils"27 "launchpad.net/snappy/_integration-tests/testutils"
28)28)
2929
30// Image type encapsulates image actions30// Image type encapsulates image actions
@@ -46,7 +46,7 @@
4646
47 imageDir := filepath.Join(img.baseDir, "image")47 imageDir := filepath.Join(img.baseDir, "image")
4848
49 utils.PrepareTargetDir(imageDir)49 testutils.PrepareTargetDir(imageDir)
5050
51 udfCommand := []string{"sudo", "ubuntu-device-flash", "--verbose"}51 udfCommand := []string{"sudo", "ubuntu-device-flash", "--verbose"}
5252
@@ -63,7 +63,7 @@
63 "--developer-mode",63 "--developer-mode",
64 }64 }
6565
66 err := utils.ExecCommand(append(udfCommand, coreOptions...)...)66 err := testutils.ExecCommand(append(udfCommand, coreOptions...)...)
6767
68 return imagePath, err68 return imagePath, err
69}69}
7070
=== renamed file '_integration-tests/helpers/utils/utils.go' => '_integration-tests/testutils/testutils.go'
--- _integration-tests/helpers/utils/utils.go 2015-07-28 12:45:26 +0000
+++ _integration-tests/testutils/testutils.go 2015-07-28 12:45:26 +0000
@@ -17,7 +17,7 @@
17 *17 *
18 */18 */
1919
20package utils20package testutils
2121
22import (22import (
23 "fmt"23 "fmt"
2424
=== modified file 'run-checks'
--- run-checks 2015-07-23 13:32:15 +0000
+++ run-checks 2015-07-28 12:45:26 +0000
@@ -46,11 +46,11 @@
46echo Running vet46echo Running vet
47go vet ./...47go vet ./...
48go vet ./_integration-tests/tests/...48go vet ./_integration-tests/tests/...
49go vet ./_integration-tests/helpers/...49go vet ./_integration-tests/testutils/...
5050
51# golint51# golint
52echo Running lint52echo Running lint
53lint=$(golint ./... && golint ./_integration-tests/helpers/... && golint ./_integration-tests/tests/...)53lint=$(golint ./... && golint ./_integration-tests/testutils/... && golint ./_integration-tests/tests/...)
54if [ -n "$lint" ]; then54if [ -n "$lint" ]; then
55 echo "Lint complains:"55 echo "Lint complains:"
56 echo "$lint"56 echo "$lint"
@@ -72,8 +72,8 @@
72go build _integration-tests/main.go72go build _integration-tests/main.go
7373
74# the rabbit hole74# the rabbit hole
75echo Running the tests for the integration helpers75echo Running the tests for the integration testutils
76$goctest -v -cover ./_integration-tests/helpers/...76$goctest -v -cover ./_integration-tests/testutils/...
7777
78# integration suite in kvm78# integration suite in kvm
79if which adt-run >/dev/null 2>&1; then79if which adt-run >/dev/null 2>&1; then

Subscribers

People subscribed via source and target branches