242857dd81
Remove various tests and utilities related to testing kubernetes support Also removing the Kubernetes and DefaultStackOrchestrator from CreateOptions and UpdateOptions, instead updating the flags to not be bound to a variable. This might break some consumers of those options, but given that they've become non-functional, that's probably ok (otherwise they may ignore the deprecation warning and end up with non-functional code). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
25 lines
703 B
Go
25 lines
703 B
Go
package context
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"gotest.tools/v3/assert"
|
|
"gotest.tools/v3/golden"
|
|
)
|
|
|
|
func TestInspect(t *testing.T) {
|
|
cli, cleanup := makeFakeCli(t)
|
|
defer cleanup()
|
|
createTestContext(t, cli, "current")
|
|
cli.OutBuffer().Reset()
|
|
assert.NilError(t, runInspect(cli, inspectOptions{
|
|
refs: []string{"current"},
|
|
}))
|
|
expected := string(golden.Get(t, "inspect.golden"))
|
|
si := cli.ContextStore().GetStorageInfo("current")
|
|
expected = strings.Replace(expected, "<METADATA_PATH>", strings.Replace(si.MetadataPath, `\`, `\\`, -1), 1)
|
|
expected = strings.Replace(expected, "<TLS_PATH>", strings.Replace(si.TLSPath, `\`, `\\`, -1), 1)
|
|
assert.Equal(t, cli.OutBuffer().String(), expected)
|
|
}
|