Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/testutil/docker_composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const shell = "/bin/bash"
type Composer interface {
// Brings all containers/VMs up according to config
Up(env []string) error
// Trears all containers/VMs dowwn
// Tears all containers/VMs down
Down() error
// Returns names/ids of running containers
Services() []string
Expand Down Expand Up @@ -55,11 +55,11 @@ type Composer interface {
// Unblocks incoming connections from host
UnBlockHostConnections(service string, host string) error
// Executes command inside container/VM with given timeout.
// Returns command retcode and output (stdoud and stderr are mixed)
// Returns command retcode and output (stdout and stderr are mixed)
RunCommand(service, cmd string, timeout time.Duration) (retcode int, output string, err error)
RunCommandAtHosts(cmd, hostsSubstring string, timeout time.Duration) error
// Executes command inside container/VM with given timeout.
// Returns command retcode and output (stdoud and stderr are mixed)
// Returns command retcode and output (stdout and stderr are mixed)
RunAsyncCommand(service, cmd string) error
// Returns content of the file from container by path
GetFile(service, path string) (io.ReadCloser, error)
Expand All @@ -75,7 +75,7 @@ type DockerComposer struct {
}

// NewDockerComposer returns DockerComposer instance for specified compose file
// Parameter project specify prefix to distguish docker container and networks from different runs
// Parameter project specify prefix to distinguish docker container and networks from different runs
func NewDockerComposer(project, config string) (*DockerComposer, error) {
if config == "" {
config = "docker-compose.yaml"
Expand Down Expand Up @@ -146,7 +146,7 @@ func (dc *DockerComposer) Up(env []string) error {
return err
}

// Down trears all containers/VMs dowwn
// Down tears all containers/VMs down
func (dc *DockerComposer) Down() error {
return dc.runCompose([]string{"down", "-v", "-t", strconv.Itoa(int(defaultDockerComposeTimeout / time.Second))}, nil)
}
Expand Down Expand Up @@ -175,7 +175,7 @@ func (dc *DockerComposer) GetAddr(service string, port int) (string, error) {
return "", fmt.Errorf("service %s does not expose port %d", service, port)
}

// GetIp returns internal ip address of given service
// GetIP returns internal ip address of given service
func (dc *DockerComposer) GetIP(service string) (string, error) {
cont, ok := dc.containers[service]
if !ok {
Expand Down
Loading