mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-23 09:10:31 +00:00
switch exec compose to docker pkg
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"text/template"
|
||||
|
||||
e2e "github.com/tendermint/tendermint/test/e2e/pkg"
|
||||
"github.com/tendermint/tendermint/test/e2e/pkg/exec"
|
||||
"github.com/tendermint/tendermint/test/e2e/pkg/infra"
|
||||
)
|
||||
|
||||
@@ -93,3 +94,22 @@ services:
|
||||
}
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
// ExecCompose runs a Docker Compose command for a testnet.
|
||||
func ExecCompose(dir string, args ...string) error {
|
||||
return exec.Command(context.Background(), append(
|
||||
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
|
||||
args...)...)
|
||||
}
|
||||
|
||||
// ExecComposeVerbose runs a Docker Compose command for a testnet and displays its output.
|
||||
func ExecComposeVerbose(dir string, args ...string) error {
|
||||
return exec.CommandVerbose(context.Background(), append(
|
||||
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
|
||||
args...)...)
|
||||
}
|
||||
|
||||
// ExecDocker runs a Docker command.
|
||||
func ExecDocker(args ...string) error {
|
||||
return exec.Command(context.Background(), append([]string{"docker"}, args...)...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user