full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
22 lines
450 B
Go
22 lines
450 B
Go
package context
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"gotest.tools/v3/golden"
|
|
"gotest.tools/v3/icmd"
|
|
)
|
|
|
|
func TestContextList(t *testing.T) {
|
|
cmd := icmd.Command("docker", "context", "ls")
|
|
cmd.Env = append(cmd.Env,
|
|
"DOCKER_CONFIG=./testdata/test-dockerconfig",
|
|
"KUBECONFIG=./testdata/test-kubeconfig",
|
|
)
|
|
result := icmd.RunCmd(cmd).Assert(t, icmd.Expected{
|
|
Err: icmd.None,
|
|
ExitCode: 0,
|
|
})
|
|
golden.Assert(t, result.Stdout(), "context-ls.golden")
|
|
}
|