mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
tests: refactor cmd helpers to allow configuring cwd, etc
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@ -8,9 +8,9 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func inspectCmd(sb integration.Sandbox, args ...string) (string, error) {
|
||||
args = append([]string{"inspect"}, args...)
|
||||
cmd := buildxCmd(sb, args...)
|
||||
func inspectCmd(sb integration.Sandbox, opts ...cmdOpt) (string, error) {
|
||||
opts = append([]cmdOpt{withArgs("inspect")}, opts...)
|
||||
cmd := buildxCmd(sb, opts...)
|
||||
out, err := cmd.CombinedOutput()
|
||||
return string(out), err
|
||||
}
|
||||
|
Reference in New Issue
Block a user