diff --git a/integration-cli/check_test.go b/integration-cli/check_test.go index 37f4b1923d..d160df5511 100644 --- a/integration-cli/check_test.go +++ b/integration-cli/check_test.go @@ -4,27 +4,136 @@ import ( "fmt" "net/http/httptest" "os" + "os/exec" "path/filepath" + "strings" "sync" "syscall" "testing" + "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/swarm" cliconfig "github.com/docker/docker/cli/config" "github.com/docker/docker/integration-cli/daemon" + "github.com/docker/docker/integration-cli/environment" "github.com/docker/docker/pkg/reexec" "github.com/go-check/check" ) -func Test(t *testing.T) { +const ( + // the private registry to use for tests + privateRegistryURL = "127.0.0.1:5000" + + // path to containerd's ctr binary + ctrBinary = "docker-containerd-ctr" + + // the docker daemon binary to use + dockerdBinary = "dockerd" +) + +var ( + testEnv *environment.Execution + + // FIXME(vdemeester) remove these and use environmentdaemonPid + protectedImages = map[string]struct{}{} + + // the docker client binary to use + dockerBinary = "docker" + + // isLocalDaemon is true if the daemon under test is on the same + // host as the CLI. + isLocalDaemon bool + // daemonPlatform is held globally so that tests can make intelligent + // decisions on how to configure themselves according to the platform + // of the daemon. This is initialized in docker_utils by sending + // a version call to the daemon and examining the response header. + daemonPlatform string + + // WindowsBaseImage is the name of the base image for Windows testing + // Environment variable WINDOWS_BASE_IMAGE can override this + WindowsBaseImage string + + // For a local daemon on Linux, these values will be used for testing + // user namespace support as the standard graph path(s) will be + // appended with the root remapped uid.gid prefix + dockerBasePath string + volumesConfigPath string + containerStoragePath string + + // daemonStorageDriver is held globally so that tests can know the storage + // driver of the daemon. This is initialized in docker_utils by sending + // a version call to the daemon and examining the response header. + daemonStorageDriver string + + // isolation is the isolation mode of the daemon under test + isolation container.Isolation + + // experimentalDaemon tell whether the main daemon has + // experimental features enabled or not + experimentalDaemon bool + + daemonKernelVersion string +) + +func init() { + var err error + reexec.Init() // This is required for external graphdriver tests + testEnv, err = environment.New() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + assignGlobalVariablesFromTestEnv(testEnv) +} + +// FIXME(vdemeester) remove this and use environment +func assignGlobalVariablesFromTestEnv(testEnv *environment.Execution) { + isLocalDaemon = testEnv.LocalDaemon() + daemonPlatform = testEnv.DaemonPlatform() + dockerBasePath = testEnv.DockerBasePath() + volumesConfigPath = testEnv.VolumesConfigPath() + containerStoragePath = testEnv.ContainerStoragePath() + daemonStorageDriver = testEnv.DaemonStorageDriver() + isolation = testEnv.Isolation() + experimentalDaemon = testEnv.ExperimentalDaemon() + daemonKernelVersion = testEnv.DaemonKernelVersion() + WindowsBaseImage = testEnv.MinimalBaseImage() +} + +func TestMain(m *testing.M) { + var err error + if dockerBin := os.Getenv("DOCKER_BINARY"); dockerBin != "" { + dockerBinary = dockerBin + } + dockerBinary, err = exec.LookPath(dockerBinary) + if err != nil { + fmt.Printf("ERROR: couldn't resolve full path to the Docker binary (%v)\n", err) + os.Exit(1) + } + + cmd := exec.Command(dockerBinary, "images", "-f", "dangling=false", "--format", "{{.Repository}}:{{.Tag}}") + cmd.Env = appendBaseEnv(true) + out, err := cmd.CombinedOutput() + if err != nil { + panic(fmt.Errorf("err=%v\nout=%s\n", err, out)) + } + images := strings.Split(strings.TrimSpace(string(out)), "\n") + for _, img := range images { + protectedImages[img] = struct{}{} + } if !isLocalDaemon { fmt.Println("INFO: Testing against a remote daemon") } else { fmt.Println("INFO: Testing against a local daemon") } + exitCode := m.Run() + os.Exit(exitCode) +} +func Test(t *testing.T) { if daemonPlatform == "linux" { ensureFrozenImagesLinux(t) } @@ -39,8 +148,8 @@ type DockerSuite struct { } func (s *DockerSuite) OnTimeout(c *check.C) { - if daemonPid > 0 && isLocalDaemon { - daemon.SignalDaemonDump(daemonPid) + if testEnv.DaemonPID() > 0 && isLocalDaemon { + daemon.SignalDaemonDump(testEnv.DaemonPID()) } } diff --git a/integration-cli/daemon/daemon.go b/integration-cli/daemon/daemon.go index 0b1c2651b3..16ded48782 100644 --- a/integration-cli/daemon/daemon.go +++ b/integration-cli/daemon/daemon.go @@ -324,7 +324,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error { func (d *Daemon) StartWithBusybox(t testingT, arg ...string) { d.Start(t, arg...) if err := d.LoadBusybox(); err != nil { - t.Fatalf("Error loading busybox image to current daeom: %s", d.id) + t.Fatalf("Error loading busybox image to current daemon: %s\n%v", d.id, err) } } diff --git a/integration-cli/docker_cli_inspect_test.go b/integration-cli/docker_cli_inspect_test.go index feda5c788c..f38e8d2acf 100644 --- a/integration-cli/docker_cli_inspect_test.go +++ b/integration-cli/docker_cli_inspect_test.go @@ -10,6 +10,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" + "github.com/docker/docker/integration-cli/environment" "github.com/docker/docker/pkg/integration/checker" icmd "github.com/docker/docker/pkg/integration/cmd" "github.com/go-check/check" @@ -212,7 +213,7 @@ func (s *DockerSuite) TestInspectBindMountPoint(c *check.C) { if daemonPlatform == "windows" { modifier = "" // TODO Windows: Temporary check - remove once TP5 support is dropped - if windowsDaemonKV < 14350 { + if environment.WindowsKernelVersion(testEnv.DaemonKernelVersion()) < 14350 { c.Skip("Needs later Windows build for RO volumes") } // Linux creates the host directory if it doesn't exist. Windows does not. diff --git a/integration-cli/docker_test_vars.go b/integration-cli/docker_test_vars.go deleted file mode 100644 index 187d0c0f58..0000000000 --- a/integration-cli/docker_test_vars.go +++ /dev/null @@ -1,142 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "strconv" - - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/pkg/reexec" -) - -const ( - // the private registry to use for tests - privateRegistryURL = "127.0.0.1:5000" - - // the docker daemon binary to use - dockerdBinary = "dockerd" -) - -var ( - // the docker client binary to use - dockerBinary = "docker" - - // path to containerd's ctr binary - ctrBinary = "docker-containerd-ctr" - - // isLocalDaemon is true if the daemon under test is on the same - // host as the CLI. - isLocalDaemon bool - - // daemonPlatform is held globally so that tests can make intelligent - // decisions on how to configure themselves according to the platform - // of the daemon. This is initialized in docker_utils by sending - // a version call to the daemon and examining the response header. - daemonPlatform string - - // windowsDaemonKV is used on Windows to distinguish between different - // versions. This is necessary to enable certain tests based on whether - // the platform supports it. For example, Windows Server 2016 TP3 did - // not support volumes, but TP4 did. - windowsDaemonKV int - - // For a local daemon on Linux, these values will be used for testing - // user namespace support as the standard graph path(s) will be - // appended with the root remapped uid.gid prefix - dockerBasePath string - volumesConfigPath string - containerStoragePath string - - // experimentalDaemon tell whether the main daemon has - // experimental features enabled or not - experimentalDaemon bool - - // daemonStorageDriver is held globally so that tests can know the storage - // driver of the daemon. This is initialized in docker_utils by sending - // a version call to the daemon and examining the response header. - daemonStorageDriver string - - // WindowsBaseImage is the name of the base image for Windows testing - // Environment variable WINDOWS_BASE_IMAGE can override this - WindowsBaseImage = "microsoft/windowsservercore" - - // isolation is the isolation mode of the daemon under test - isolation container.Isolation - - // daemonPid is the pid of the main test daemon - daemonPid int - - daemonKernelVersion string -) - -func init() { - reexec.Init() - if dockerBin := os.Getenv("DOCKER_BINARY"); dockerBin != "" { - dockerBinary = dockerBin - } - var err error - dockerBinary, err = exec.LookPath(dockerBinary) - if err != nil { - fmt.Printf("ERROR: couldn't resolve full path to the Docker binary (%v)\n", err) - os.Exit(1) - } - - // Deterministically working out the environment in which CI is running - // to evaluate whether the daemon is local or remote is not possible through - // a build tag. - // - // For example Windows to Linux CI under Jenkins tests the 64-bit - // Windows binary build with the daemon build tag, but calls a remote - // Linux daemon. - // - // We can't just say if Windows then assume the daemon is local as at - // some point, we will be testing the Windows CLI against a Windows daemon. - // - // Similarly, it will be perfectly valid to also run CLI tests from - // a Linux CLI (built with the daemon tag) against a Windows daemon. - if len(os.Getenv("DOCKER_REMOTE_DAEMON")) > 0 { - isLocalDaemon = false - } else { - isLocalDaemon = true - } - - // TODO Windows CI. This are incorrect and need fixing into - // platform specific pieces. - // This is only used for a tests with local daemon true (Linux-only today) - // default is "/var/lib/docker", but we'll try and ask the - // /info endpoint for the specific root dir - dockerBasePath = "/var/lib/docker" - type Info struct { - DockerRootDir string - ExperimentalBuild bool - KernelVersion string - } - var i Info - status, b, err := sockRequest("GET", "/info", nil) - if err == nil && status == 200 { - if err = json.Unmarshal(b, &i); err == nil { - dockerBasePath = i.DockerRootDir - experimentalDaemon = i.ExperimentalBuild - daemonKernelVersion = i.KernelVersion - } - } - volumesConfigPath = dockerBasePath + "/volumes" - containerStoragePath = dockerBasePath + "/containers" - - if len(os.Getenv("WINDOWS_BASE_IMAGE")) > 0 { - WindowsBaseImage = os.Getenv("WINDOWS_BASE_IMAGE") - fmt.Println("INFO: Windows Base image is ", WindowsBaseImage) - } - - dest := os.Getenv("DEST") - b, err = ioutil.ReadFile(filepath.Join(dest, "docker.pid")) - if err == nil { - if p, err := strconv.ParseInt(string(b), 10, 32); err == nil { - daemonPid = int(p) - } - } -} diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils_test.go similarity index 94% rename from integration-cli/docker_utils.go rename to integration-cli/docker_utils_test.go index 2a00585833..90939dc7ce 100644 --- a/integration-cli/docker_utils.go +++ b/integration-cli/docker_utils_test.go @@ -25,7 +25,6 @@ import ( volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/opts" - "github.com/docker/docker/pkg/httputils" "github.com/docker/docker/pkg/integration" "github.com/docker/docker/pkg/integration/checker" icmd "github.com/docker/docker/pkg/integration/cmd" @@ -34,60 +33,6 @@ import ( "github.com/go-check/check" ) -func init() { - cmd := exec.Command(dockerBinary, "images", "-f", "dangling=false", "--format", "{{.Repository}}:{{.Tag}}") - cmd.Env = appendBaseEnv(true) - out, err := cmd.CombinedOutput() - if err != nil { - panic(fmt.Errorf("err=%v\nout=%s\n", err, out)) - } - images := strings.Split(strings.TrimSpace(string(out)), "\n") - for _, img := range images { - protectedImages[img] = struct{}{} - } - - res, body, err := sockRequestRaw("GET", "/info", nil, "application/json") - if err != nil { - panic(fmt.Errorf("Init failed to get /info: %v", err)) - } - defer body.Close() - if res.StatusCode != http.StatusOK { - panic(fmt.Errorf("Init failed to get /info. Res=%v", res)) - } - - svrHeader, _ := httputils.ParseServerHeader(res.Header.Get("Server")) - daemonPlatform = svrHeader.OS - if daemonPlatform != "linux" && daemonPlatform != "windows" { - panic("Cannot run tests against platform: " + daemonPlatform) - } - - // Now we know the daemon platform, can set paths used by tests. - var info types.Info - err = json.NewDecoder(body).Decode(&info) - if err != nil { - panic(fmt.Errorf("Init failed to unmarshal docker info: %v", err)) - } - - daemonStorageDriver = info.Driver - dockerBasePath = info.DockerRootDir - volumesConfigPath = filepath.Join(dockerBasePath, "volumes") - containerStoragePath = filepath.Join(dockerBasePath, "containers") - // Make sure in context of daemon, not the local platform. Note we can't - // use filepath.FromSlash or ToSlash here as they are a no-op on Unix. - if daemonPlatform == "windows" { - volumesConfigPath = strings.Replace(volumesConfigPath, `/`, `\`, -1) - containerStoragePath = strings.Replace(containerStoragePath, `/`, `\`, -1) - // On Windows, extract out the version as we need to make selective - // decisions during integration testing as and when features are implemented. - // e.g. in "10.0 10550 (10550.1000.amd64fre.branch.date-time)" we want 10550 - windowsDaemonKV, _ = strconv.Atoi(strings.Split(info.KernelVersion, " ")[1]) - } else { - volumesConfigPath = strings.Replace(volumesConfigPath, `\`, `/`, -1) - containerStoragePath = strings.Replace(containerStoragePath, `\`, `/`, -1) - } - isolation = info.Isolation -} - func daemonHost() string { daemonURLStr := "unix://" + opts.DefaultUnixSocket if daemonHostVar := os.Getenv("DOCKER_HOST"); daemonHostVar != "" { @@ -292,8 +237,6 @@ func getAllVolumes() ([]*types.Volume, error) { return volumes.Volumes, nil } -var protectedImages = map[string]struct{}{} - func deleteAllImages(c *check.C) { cmd := exec.Command(dockerBinary, "images", "--digests") cmd.Env = appendBaseEnv(true) @@ -1265,10 +1208,7 @@ func runSleepingContainerInImage(c *check.C, image string, extraArgs ...string) // minimalBaseImage returns the name of the minimal base image for the current // daemon platform. func minimalBaseImage() string { - if daemonPlatform == "windows" { - return WindowsBaseImage - } - return "scratch" + return testEnv.MinimalBaseImage() } func getGoroutineNumber() (int, error) { diff --git a/integration-cli/environment/environment.go b/integration-cli/environment/environment.go new file mode 100644 index 0000000000..895ebcc17b --- /dev/null +++ b/integration-cli/environment/environment.go @@ -0,0 +1,184 @@ +package environment + +import ( + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strconv" + "strings" + + "golang.org/x/net/context" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/client" +) + +// Execution holds informations about the test execution environment. +type Execution struct { + daemonPlatform string + localDaemon bool + experimentalDaemon bool + daemonStorageDriver string + isolation container.Isolation + daemonPid int + daemonKernelVersion string + // For a local daemon on Linux, these values will be used for testing + // user namespace support as the standard graph path(s) will be + // appended with the root remapped uid.gid prefix + dockerBasePath string + volumesConfigPath string + containerStoragePath string + // baseImage is the name of the base image for testing + // Environment variable WINDOWS_BASE_IMAGE can override this + baseImage string +} + +// New creates a new Execution struct +func New() (*Execution, error) { + localDaemon := true + // Deterministically working out the environment in which CI is running + // to evaluate whether the daemon is local or remote is not possible through + // a build tag. + // + // For example Windows to Linux CI under Jenkins tests the 64-bit + // Windows binary build with the daemon build tag, but calls a remote + // Linux daemon. + // + // We can't just say if Windows then assume the daemon is local as at + // some point, we will be testing the Windows CLI against a Windows daemon. + // + // Similarly, it will be perfectly valid to also run CLI tests from + // a Linux CLI (built with the daemon tag) against a Windows daemon. + if len(os.Getenv("DOCKER_REMOTE_DAEMON")) > 0 { + localDaemon = false + } + info, err := getDaemonDockerInfo() + if err != nil { + return nil, err + } + daemonPlatform := info.OSType + if daemonPlatform != "linux" && daemonPlatform != "windows" { + return nil, fmt.Errorf("Cannot run tests against platform: %s", daemonPlatform) + } + baseImage := "scratch" + volumesConfigPath := filepath.Join(info.DockerRootDir, "volumes") + containerStoragePath := filepath.Join(info.DockerRootDir, "containers") + // Make sure in context of daemon, not the local platform. Note we can't + // use filepath.FromSlash or ToSlash here as they are a no-op on Unix. + if daemonPlatform == "windows" { + volumesConfigPath = strings.Replace(volumesConfigPath, `/`, `\`, -1) + containerStoragePath = strings.Replace(containerStoragePath, `/`, `\`, -1) + + baseImage = "microsoft/windowsservercore" + if len(os.Getenv("WINDOWS_BASE_IMAGE")) > 0 { + baseImage = os.Getenv("WINDOWS_BASE_IMAGE") + fmt.Println("INFO: Windows Base image is ", baseImage) + } + } else { + volumesConfigPath = strings.Replace(volumesConfigPath, `\`, `/`, -1) + containerStoragePath = strings.Replace(containerStoragePath, `\`, `/`, -1) + } + + var daemonPid int + dest := os.Getenv("DEST") + b, err := ioutil.ReadFile(filepath.Join(dest, "docker.pid")) + if err == nil { + if p, err := strconv.ParseInt(string(b), 10, 32); err == nil { + daemonPid = int(p) + } + } + return &Execution{ + localDaemon: localDaemon, + daemonPlatform: daemonPlatform, + daemonStorageDriver: info.Driver, + daemonKernelVersion: info.KernelVersion, + dockerBasePath: info.DockerRootDir, + volumesConfigPath: volumesConfigPath, + containerStoragePath: containerStoragePath, + isolation: info.Isolation, + daemonPid: daemonPid, + experimentalDaemon: info.ExperimentalBuild, + baseImage: baseImage, + }, nil +} +func getDaemonDockerInfo() (types.Info, error) { + // FIXME(vdemeester) should be safe to use as is + client, err := client.NewEnvClient() + if err != nil { + return types.Info{}, err + } + return client.Info(context.Background()) +} + +// LocalDaemon is true if the daemon under test is on the same +// host as the CLI. +func (e *Execution) LocalDaemon() bool { + return e.localDaemon +} + +// DaemonPlatform is held globally so that tests can make intelligent +// decisions on how to configure themselves according to the platform +// of the daemon. This is initialized in docker_utils by sending +// a version call to the daemon and examining the response header. +func (e *Execution) DaemonPlatform() string { + return e.daemonPlatform +} + +// DockerBasePath is the base path of the docker folder (by default it is -/var/run/docker) +func (e *Execution) DockerBasePath() string { + return e.dockerBasePath +} + +// VolumesConfigPath is the path of the volume configuration for the testing daemon +func (e *Execution) VolumesConfigPath() string { + return e.volumesConfigPath +} + +// ContainerStoragePath is the path where the container are stored for the testing daemon +func (e *Execution) ContainerStoragePath() string { + return e.containerStoragePath +} + +// DaemonStorageDriver is held globally so that tests can know the storage +// driver of the daemon. This is initialized in docker_utils by sending +// a version call to the daemon and examining the response header. +func (e *Execution) DaemonStorageDriver() string { + return e.daemonStorageDriver +} + +// Isolation is the isolation mode of the daemon under test +func (e *Execution) Isolation() container.Isolation { + return e.isolation +} + +// DaemonPID is the pid of the main test daemon +func (e *Execution) DaemonPID() int { + return e.daemonPid +} + +// ExperimentalDaemon tell whether the main daemon has +// experimental features enabled or not +func (e *Execution) ExperimentalDaemon() bool { + return e.experimentalDaemon +} + +// MinimalBaseImage is the image used for minimal builds (it depends on the platform) +func (e *Execution) MinimalBaseImage() string { + return e.baseImage +} + +// DaemonKernelVersion is the kernel version of the daemon +func (e *Execution) DaemonKernelVersion() string { + return e.daemonKernelVersion +} + +// WindowsKernelVersion is used on Windows to distinguish between different +// versions. This is necessary to enable certain tests based on whether +// the platform supports it. For example, Windows Server 2016 TP3 did +// not support volumes, but TP4 did. +func WindowsKernelVersion(kernelVersion string) int { + winKV, _ := strconv.Atoi(strings.Split(kernelVersion, " ")[1]) + return winKV +} diff --git a/integration-cli/events_utils.go b/integration-cli/events_utils_test.go similarity index 100% rename from integration-cli/events_utils.go rename to integration-cli/events_utils_test.go diff --git a/integration-cli/fixtures_linux_daemon.go b/integration-cli/fixtures_linux_daemon_test.go similarity index 95% rename from integration-cli/fixtures_linux_daemon.go rename to integration-cli/fixtures_linux_daemon_test.go index b9484f3a2a..58aedfaf3c 100644 --- a/integration-cli/fixtures_linux_daemon.go +++ b/integration-cli/fixtures_linux_daemon_test.go @@ -9,18 +9,26 @@ import ( "runtime" "strings" "sync" - "testing" "github.com/docker/docker/integration-cli/fixtures/load" "github.com/docker/docker/pkg/integration/checker" "github.com/go-check/check" ) -func ensureFrozenImagesLinux(t *testing.T) { +type testingT interface { + logT + Fatalf(string, ...interface{}) +} + +type logT interface { + Logf(string, ...interface{}) +} + +func ensureFrozenImagesLinux(t testingT) { images := []string{"busybox:latest", "hello-world:frozen", "debian:jessie"} err := load.FrozenImagesLinux(dockerBinary, images...) if err != nil { - t.Log(dockerCmdWithError("images")) + t.Logf(dockerCmdWithError("images")) t.Fatalf("%+v", err) } for _, img := range images { diff --git a/integration-cli/fixtures.go b/integration-cli/fixtures_test.go similarity index 100% rename from integration-cli/fixtures.go rename to integration-cli/fixtures_test.go diff --git a/integration-cli/registry_mock.go b/integration-cli/registry_mock_test.go similarity index 100% rename from integration-cli/registry_mock.go rename to integration-cli/registry_mock_test.go diff --git a/integration-cli/registry.go b/integration-cli/registry_test.go similarity index 100% rename from integration-cli/registry.go rename to integration-cli/registry_test.go diff --git a/integration-cli/test_vars_exec.go b/integration-cli/test_vars_exec_test.go similarity index 100% rename from integration-cli/test_vars_exec.go rename to integration-cli/test_vars_exec_test.go diff --git a/integration-cli/test_vars_noexec.go b/integration-cli/test_vars_noexec_test.go similarity index 100% rename from integration-cli/test_vars_noexec.go rename to integration-cli/test_vars_noexec_test.go diff --git a/integration-cli/test_vars_noseccomp.go b/integration-cli/test_vars_noseccomp_test.go similarity index 100% rename from integration-cli/test_vars_noseccomp.go rename to integration-cli/test_vars_noseccomp_test.go diff --git a/integration-cli/test_vars_seccomp.go b/integration-cli/test_vars_seccomp_test.go similarity index 100% rename from integration-cli/test_vars_seccomp.go rename to integration-cli/test_vars_seccomp_test.go diff --git a/integration-cli/test_vars.go b/integration-cli/test_vars_test.go similarity index 100% rename from integration-cli/test_vars.go rename to integration-cli/test_vars_test.go diff --git a/integration-cli/test_vars_unix.go b/integration-cli/test_vars_unix_test.go similarity index 100% rename from integration-cli/test_vars_unix.go rename to integration-cli/test_vars_unix_test.go diff --git a/integration-cli/test_vars_windows.go b/integration-cli/test_vars_windows_test.go similarity index 100% rename from integration-cli/test_vars_windows.go rename to integration-cli/test_vars_windows_test.go diff --git a/integration-cli/trust_server.go b/integration-cli/trust_server_test.go similarity index 100% rename from integration-cli/trust_server.go rename to integration-cli/trust_server_test.go diff --git a/integration-cli/utils.go b/integration-cli/utils_test.go similarity index 100% rename from integration-cli/utils.go rename to integration-cli/utils_test.go