From f8a3aec64d771dc8e15004e3ccdba396a6720917 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Thu, 1 Oct 2020 16:03:22 +0200 Subject: [PATCH 1/2] Add aci volumes e2e test Signed-off-by: Ulysses Souza --- go.mod | 2 + go.sum | 1 + tests/aci-e2e/e2e-aci_test.go | 114 ++++++++++++++---- .../aci-demo/aci_demo_multiport_volumes.yaml | 16 +++ ...olumes.yaml => aci_demo_port_volumes.yaml} | 6 +- tests/framework/e2e.go | 4 +- 6 files changed, 112 insertions(+), 31 deletions(-) create mode 100644 tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml rename tests/composefiles/aci-demo/{aci_demo_port_secrets_volumes.yaml => aci_demo_port_volumes.yaml} (69%) diff --git a/go.mod b/go.mod index aef8bdfa4..6c6b0c6ad 100644 --- a/go.mod +++ b/go.mod @@ -48,6 +48,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/runc v0.1.1 // indirect github.com/pkg/errors v0.9.1 + github.com/prometheus/tsdb v0.7.1 github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b github.com/sirupsen/logrus v1.6.0 github.com/smartystreets/goconvey v1.6.4 // indirect @@ -62,6 +63,7 @@ require ( google.golang.org/protobuf v1.25.0 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/ini.v1 v1.61.0 + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c gotest.tools v2.2.0+incompatible gotest.tools/v3 v3.0.2 ) diff --git a/go.sum b/go.sum index 1239c69e3..92e23aadf 100644 --- a/go.sum +++ b/go.sum @@ -404,6 +404,7 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= diff --git a/tests/aci-e2e/e2e-aci_test.go b/tests/aci-e2e/e2e-aci_test.go index ea367206c..26f16a514 100644 --- a/tests/aci-e2e/e2e-aci_test.go +++ b/tests/aci-e2e/e2e-aci_test.go @@ -20,10 +20,13 @@ import ( "context" "errors" "fmt" + "github.com/prometheus/tsdb/fileutil" + "io/ioutil" "math/rand" "net/http" "net/url" "os" + "path/filepath" "runtime" "strconv" "strings" @@ -31,6 +34,9 @@ import ( "testing" "time" + "github.com/compose-spec/compose-go/loader" + "github.com/compose-spec/compose-go/types" + "gopkg.in/yaml.v3" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" "gotest.tools/v3/icmd" @@ -133,16 +139,27 @@ func getTestLocation() string { return location[n] } -func TestContainerRunVolume(t *testing.T) { - c := NewParallelE2eCLI(t, binDir) - sID, rg, location := setupTestResourceGroup(t, c) +func uploadTestFile(t *testing.T, aciContext store.AciContext, accountName string, fileshareName string, testFileName string, testFileContent string) { + storageLogin := login.StorageLoginImpl{AciContext: aciContext} + key, err := storageLogin.GetAzureStorageAccountKey(context.TODO(), accountName) + assert.NilError(t, err) + cred, err := azfile.NewSharedKeyCredential(accountName, key) + assert.NilError(t, err) + u, _ := url.Parse(fmt.Sprintf("https://%s.file.core.windows.net/%s", accountName, fileshareName)) + uploadFile(t, *cred, u.String(), testFileName, testFileContent) +} +const fileshareName = "dockertestshare" + +func TestRunVolume(t *testing.T) { const ( - fileshareName = "dockertestshare" testFileContent = "Volume mounted successfully!" testFileName = "index.html" ) + c := NewParallelE2eCLI(t, binDir) + sID, rg, location := setupTestResourceGroup(t, c) + // Bootstrap volume aciContext := store.AciContext{ SubscriptionID: sID, @@ -180,8 +197,8 @@ func TestContainerRunVolume(t *testing.T) { t.Run("create volumes", func(t *testing.T) { c.RunDockerCmd("volume", "create", "--storage-account", accountName, fileshareName) }) - volumeID = accountName + "/" + fileshareName + volumeID = accountName + "/" + fileshareName t.Cleanup(func() { c.RunDockerCmd("volume", "rm", volumeID) res := c.RunDockerCmd("volume", "ls") @@ -215,14 +232,7 @@ func TestContainerRunVolume(t *testing.T) { }) t.Run("upload file", func(t *testing.T) { - storageLogin := login.StorageLoginImpl{AciContext: aciContext} - - key, err := storageLogin.GetAzureStorageAccountKey(context.TODO(), accountName) - assert.NilError(t, err) - cred, err := azfile.NewSharedKeyCredential(accountName, key) - assert.NilError(t, err) - u, _ := url.Parse(fmt.Sprintf("https://%s.file.core.windows.net/%s", accountName, fileshareName)) - uploadFile(t, *cred, u.String(), testFileName, testFileContent) + uploadTestFile(t, aciContext, accountName, fileshareName, testFileName, testFileContent) }) t.Run("run", func(t *testing.T) { @@ -465,24 +475,73 @@ func TestContainerRunAttached(t *testing.T) { }) } -func TestComposeUpUpdate(t *testing.T) { - c := NewParallelE2eCLI(t, binDir) - _, groupID, location := setupTestResourceGroup(t, c) +func overwriteFileStorageAccount(t *testing.T, absComposefileName string, storageAccount string) { + data, err := ioutil.ReadFile(absComposefileName) + m, err := loader.ParseYAML(data) + assert.NilError(t, err) + p, err := loader.Load(types.ConfigDetails{ConfigFiles: []types.ConfigFile{{Config: m}}}) + p.Volumes["mydata"].DriverOpts["storage_account_name"] = storageAccount + out, err := yaml.Marshal(p) + assert.NilError(t, err) + // FIXME(ulyssessouza): Change `compose-go` to omit `WorkingDir` and `Name` on YAML serialization + outBytes := []byte(strings.Join(strings.Split(string(out), "\n")[2:], "\n")) // Removes the first 2 lines + err = ioutil.WriteFile(absComposefileName, outBytes, 0644) + assert.NilError(t, err) +} +func TestUpUpdate(t *testing.T) { const ( - composeFile = "../composefiles/aci-demo/aci_demo_port.yaml" - composeFileMultiplePorts = "../composefiles/aci-demo/aci_demo_multi_port.yaml" - composeProjectName = "acidemo" - serverContainer = composeProjectName + "_web" - wordsContainer = composeProjectName + "_words" - dbContainer = composeProjectName + "_db" + composeProjectName = "acidemo" + serverContainer = composeProjectName + "_web" + wordsContainer = composeProjectName + "_words" + dbContainer = composeProjectName + "_db" ) + var ( + singlePortVolumesComposefile = "aci_demo_port_volumes.yaml" + multiPortVolumesComposefile = "aci_demo_multiport_volumes.yaml" + ) + c := NewParallelE2eCLI(t, binDir) + sID, groupID, location := setupTestResourceGroup(t, c) + composeAccountName := groupID + "-sa" + composeAccountName = strings.ReplaceAll(composeAccountName, "-", "") + composeAccountName = strings.ToLower(composeAccountName) + + dstDir := filepath.Join(os.TempDir(), "e2e-aci-volume-"+composeAccountName) + err := fileutil.CopyDirs("../composefiles/aci-demo/", dstDir) + assert.NilError(t, err) + t.Cleanup(func() { + assert.NilError(t, os.RemoveAll(dstDir)) + }) + + singlePortVolumesComposefile = filepath.Join(dstDir, singlePortVolumesComposefile) + overwriteFileStorageAccount(t, singlePortVolumesComposefile, composeAccountName) + multiPortVolumesComposefile = filepath.Join(dstDir, multiPortVolumesComposefile) + t.Run("compose up", func(t *testing.T) { + const ( + testFileName = "msg.txt" + testFileContent = "VOLUME_OK" + ) + + c.RunDockerCmd("volume", "create", "--storage-account", composeAccountName, fileshareName) + volumeID := composeAccountName + "/" + fileshareName + t.Cleanup(func() { + c.RunDockerCmd("volume", "rm", volumeID) + }) + + // Bootstrap volume + aciContext := store.AciContext{ + SubscriptionID: sID, + Location: location, + ResourceGroup: groupID, + } + uploadTestFile(t, aciContext, composeAccountName, fileshareName, testFileName, testFileContent) + dnsLabelName := "nginx-" + groupID fqdn := dnsLabelName + "." + location + ".azurecontainer.io" // Name of Compose project is taken from current folder "acie2e" - c.RunDockerCmd("compose", "up", "-f", composeFile, "--domainname", dnsLabelName) + c.RunDockerCmd("compose", "up", "-f", singlePortVolumesComposefile, "--domainname", dnsLabelName, "--project-name", "acidemo") res := c.RunDockerCmd("ps") out := lines(res.Stdout()) @@ -495,7 +554,7 @@ func TestComposeUpUpdate(t *testing.T) { strings.Contains(l, ":80->80/tcp") } } - assert.Assert(t, webRunning, "web container not running") + assert.Assert(t, webRunning, "web container not running ; ps:\n" + res.Stdout()) res = c.RunDockerCmd("inspect", serverContainer) @@ -510,6 +569,9 @@ func TestComposeUpUpdate(t *testing.T) { endpoint = fmt.Sprintf("http://%s:%d", fqdn, containerInspect.Ports[0].HostPort) HTTPGetWithRetry(t, endpoint+"/words/noun", http.StatusOK, 2*time.Second, 20*time.Second) + + body := HTTPGetWithRetry(t, endpoint+"/volume_test/"+testFileName, http.StatusOK, 2*time.Second, 20*time.Second) + assert.Assert(t, strings.Contains(body, testFileContent)) }) t.Run("compose ps", func(t *testing.T) { @@ -553,7 +615,7 @@ func TestComposeUpUpdate(t *testing.T) { }) t.Run("update", func(t *testing.T) { - c.RunDockerCmd("compose", "up", "-f", composeFileMultiplePorts, "--project-name", composeProjectName) + c.RunDockerCmd("compose", "up", "-f", multiPortVolumesComposefile, "--project-name", composeProjectName) res := c.RunDockerCmd("ps") out := lines(res.Stdout()) // Check three containers are running @@ -645,7 +707,7 @@ func TestRunEnvVars(t *testing.T) { func setupTestResourceGroup(t *testing.T, c *E2eCLI) (string, string, string) { startTime := strconv.Itoa(int(time.Now().Unix())) - rg := "E2E-" + t.Name() + "-" + startTime + rg := "E2E-" + t.Name() + "-" + startTime[5:] azureLogin(t, c) sID := getSubscriptionID(t) location := getTestLocation() diff --git a/tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml b/tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml new file mode 100644 index 000000000..2a6c93bd6 --- /dev/null +++ b/tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml @@ -0,0 +1,16 @@ +services: + db: + build: db + image: gtardif/sentences-db + + words: + build: words + image: gtardif/sentences-api + ports: + - "8080:8080" + + web: + build: web + image: gtardif/sentences-web + ports: + - "80:80" diff --git a/tests/composefiles/aci-demo/aci_demo_port_secrets_volumes.yaml b/tests/composefiles/aci-demo/aci_demo_port_volumes.yaml similarity index 69% rename from tests/composefiles/aci-demo/aci_demo_port_secrets_volumes.yaml rename to tests/composefiles/aci-demo/aci_demo_port_volumes.yaml index 8bc275c6f..d19d4fd49 100644 --- a/tests/composefiles/aci-demo/aci_demo_port_secrets_volumes.yaml +++ b/tests/composefiles/aci-demo/aci_demo_port_volumes.yaml @@ -13,11 +13,11 @@ services: ports: - "80:80" volumes: - - mydata:/mount/testvolumes + - mydata:/static/volume_test volumes: mydata: driver: azure_file driver_opts: - share_name: minecraft-volume - storage_account_name: minecraftdocker + share_name: dockertestshare + storage_account_name: dockertestvolumeaccount diff --git a/tests/framework/e2e.go b/tests/framework/e2e.go index d15313cf7..9b407341e 100644 --- a/tests/framework/e2e.go +++ b/tests/framework/e2e.go @@ -142,7 +142,7 @@ func CopyFile(sourceFile string, destinationFile string) error { return nil } -// NewCmd creates a cmd object configured with the test environment set +// NewCmd creates a cmd object configured with the Test environment set func (c *E2eCLI) NewCmd(command string, args ...string) icmd.Cmd { env := append(os.Environ(), "DOCKER_CONFIG="+c.ConfigDir, @@ -173,7 +173,7 @@ func (c *E2eCLI) RunDockerCmd(args ...string) *icmd.Result { return res } -// PathEnvVar returns path (os sensitive) for running test +// PathEnvVar returns path (os sensitive) for running Test func (c *E2eCLI) PathEnvVar() string { path := c.BinDir + ":" + os.Getenv("PATH") if runtime.GOOS == "windows" { From 9cc914ef07d9de23c770f2658d0488b63858207e Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 6 Oct 2020 17:46:13 +0200 Subject: [PATCH 2/2] No need for docker dependency for CopyDir, and yaml parser. No need for multiport compose file with volumes Signed-off-by: Guillaume Tardif --- go.mod | 1 - go.sum | 4 ++++ tests/aci-e2e/e2e-aci_test.go | 24 ++++++------------- .../aci-demo/aci_demo_multiport_volumes.yaml | 16 ------------- tests/framework/e2e.go | 4 ++-- 5 files changed, 13 insertions(+), 36 deletions(-) delete mode 100644 tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml diff --git a/go.mod b/go.mod index 6c6b0c6ad..ff6d7d760 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,6 @@ require ( google.golang.org/protobuf v1.25.0 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/ini.v1 v1.61.0 - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c gotest.tools v2.2.0+incompatible gotest.tools/v3 v3.0.2 ) diff --git a/go.sum b/go.sum index 92e23aadf..c393b60e3 100644 --- a/go.sum +++ b/go.sum @@ -188,11 +188,14 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -312,6 +315,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= diff --git a/tests/aci-e2e/e2e-aci_test.go b/tests/aci-e2e/e2e-aci_test.go index 26f16a514..bf208ae55 100644 --- a/tests/aci-e2e/e2e-aci_test.go +++ b/tests/aci-e2e/e2e-aci_test.go @@ -20,7 +20,6 @@ import ( "context" "errors" "fmt" - "github.com/prometheus/tsdb/fileutil" "io/ioutil" "math/rand" "net/http" @@ -34,9 +33,6 @@ import ( "testing" "time" - "github.com/compose-spec/compose-go/loader" - "github.com/compose-spec/compose-go/types" - "gopkg.in/yaml.v3" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" "gotest.tools/v3/icmd" @@ -45,6 +41,7 @@ import ( "github.com/Azure/azure-sdk-for-go/profiles/2019-03-01/resources/mgmt/resources" "github.com/Azure/azure-storage-file-go/azfile" "github.com/Azure/go-autorest/autorest/to" + "github.com/prometheus/tsdb/fileutil" "github.com/docker/compose-cli/aci" "github.com/docker/compose-cli/aci/convert" @@ -477,15 +474,9 @@ func TestContainerRunAttached(t *testing.T) { func overwriteFileStorageAccount(t *testing.T, absComposefileName string, storageAccount string) { data, err := ioutil.ReadFile(absComposefileName) - m, err := loader.ParseYAML(data) assert.NilError(t, err) - p, err := loader.Load(types.ConfigDetails{ConfigFiles: []types.ConfigFile{{Config: m}}}) - p.Volumes["mydata"].DriverOpts["storage_account_name"] = storageAccount - out, err := yaml.Marshal(p) - assert.NilError(t, err) - // FIXME(ulyssessouza): Change `compose-go` to omit `WorkingDir` and `Name` on YAML serialization - outBytes := []byte(strings.Join(strings.Split(string(out), "\n")[2:], "\n")) // Removes the first 2 lines - err = ioutil.WriteFile(absComposefileName, outBytes, 0644) + override := strings.Replace(string(data), "dockertestvolumeaccount", storageAccount, 1) + err = ioutil.WriteFile(absComposefileName, []byte(override), 0644) assert.NilError(t, err) } @@ -498,7 +489,7 @@ func TestUpUpdate(t *testing.T) { ) var ( singlePortVolumesComposefile = "aci_demo_port_volumes.yaml" - multiPortVolumesComposefile = "aci_demo_multiport_volumes.yaml" + multiPortComposefile = "aci_demo_multi_port.yaml" ) c := NewParallelE2eCLI(t, binDir) sID, groupID, location := setupTestResourceGroup(t, c) @@ -515,8 +506,7 @@ func TestUpUpdate(t *testing.T) { singlePortVolumesComposefile = filepath.Join(dstDir, singlePortVolumesComposefile) overwriteFileStorageAccount(t, singlePortVolumesComposefile, composeAccountName) - multiPortVolumesComposefile = filepath.Join(dstDir, multiPortVolumesComposefile) - + multiPortComposefile = filepath.Join(dstDir, multiPortComposefile) t.Run("compose up", func(t *testing.T) { const ( @@ -554,7 +544,7 @@ func TestUpUpdate(t *testing.T) { strings.Contains(l, ":80->80/tcp") } } - assert.Assert(t, webRunning, "web container not running ; ps:\n" + res.Stdout()) + assert.Assert(t, webRunning, "web container not running ; ps:\n"+res.Stdout()) res = c.RunDockerCmd("inspect", serverContainer) @@ -615,7 +605,7 @@ func TestUpUpdate(t *testing.T) { }) t.Run("update", func(t *testing.T) { - c.RunDockerCmd("compose", "up", "-f", multiPortVolumesComposefile, "--project-name", composeProjectName) + c.RunDockerCmd("compose", "up", "-f", multiPortComposefile, "--project-name", composeProjectName) res := c.RunDockerCmd("ps") out := lines(res.Stdout()) // Check three containers are running diff --git a/tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml b/tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml deleted file mode 100644 index 2a6c93bd6..000000000 --- a/tests/composefiles/aci-demo/aci_demo_multiport_volumes.yaml +++ /dev/null @@ -1,16 +0,0 @@ -services: - db: - build: db - image: gtardif/sentences-db - - words: - build: words - image: gtardif/sentences-api - ports: - - "8080:8080" - - web: - build: web - image: gtardif/sentences-web - ports: - - "80:80" diff --git a/tests/framework/e2e.go b/tests/framework/e2e.go index 9b407341e..d15313cf7 100644 --- a/tests/framework/e2e.go +++ b/tests/framework/e2e.go @@ -142,7 +142,7 @@ func CopyFile(sourceFile string, destinationFile string) error { return nil } -// NewCmd creates a cmd object configured with the Test environment set +// NewCmd creates a cmd object configured with the test environment set func (c *E2eCLI) NewCmd(command string, args ...string) icmd.Cmd { env := append(os.Environ(), "DOCKER_CONFIG="+c.ConfigDir, @@ -173,7 +173,7 @@ func (c *E2eCLI) RunDockerCmd(args ...string) *icmd.Result { return res } -// PathEnvVar returns path (os sensitive) for running Test +// PathEnvVar returns path (os sensitive) for running test func (c *E2eCLI) PathEnvVar() string { path := c.BinDir + ":" + os.Getenv("PATH") if runtime.GOOS == "windows" {