From c3cc54316bbee295cd3e441379f570197fa392e5 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Fri, 30 Oct 2020 13:25:42 +0100 Subject: [PATCH] =?UTF-8?q?This=20new=20field=20Named=20=E2=80=9CType?= =?UTF-8?q?=E2=80=9D=20breaks=20VSCode=20extension=20for=20some=20strange?= =?UTF-8?q?=20reason,=20lets=20rename=20it=20ContextType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guillaume Tardif --- cli/cmd/context/ls.go | 6 +++--- tests/e2e/testdata/ls-out-json-windows.golden | 2 +- tests/e2e/testdata/ls-out-json.golden | 2 +- tests/e2e/testdata/ls-out-legacy-json-windows.golden | 2 +- tests/e2e/testdata/ls-out-legacy-json.golden | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/cmd/context/ls.go b/cli/cmd/context/ls.go index c836b5d3c..f4485d620 100644 --- a/cli/cmd/context/ls.go +++ b/cli/cmd/context/ls.go @@ -111,7 +111,7 @@ func runList(cmd *cobra.Command, opts lsOpts) error { } _, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n", contextName, - c.Type, + c.ContextType, c.Description, c.DockerEndpoint, c.KubernetesEndpoint, @@ -144,7 +144,7 @@ type contextView struct { Description string DockerEndpoint string KubernetesEndpoint string - Type string + ContextType string Name string StackOrchestrator string } @@ -158,7 +158,7 @@ func viewFromContextList(contextList []*store.DockerContext, currentContext stri DockerEndpoint: getEndpoint("docker", c.Endpoints), KubernetesEndpoint: getEndpoint("kubernetes", c.Endpoints), Name: c.Name, - Type: c.Type(), + ContextType: c.Type(), StackOrchestrator: c.Metadata.StackOrchestrator, } } diff --git a/tests/e2e/testdata/ls-out-json-windows.golden b/tests/e2e/testdata/ls-out-json-windows.golden index c16354247..4d2c3306e 100644 --- a/tests/e2e/testdata/ls-out-json-windows.golden +++ b/tests/e2e/testdata/ls-out-json-windows.golden @@ -1 +1 @@ -[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"}] +[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}] diff --git a/tests/e2e/testdata/ls-out-json.golden b/tests/e2e/testdata/ls-out-json.golden index 828827532..c387b2cde 100644 --- a/tests/e2e/testdata/ls-out-json.golden +++ b/tests/e2e/testdata/ls-out-json.golden @@ -1 +1 @@ -[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"}] +[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}] diff --git a/tests/e2e/testdata/ls-out-legacy-json-windows.golden b/tests/e2e/testdata/ls-out-legacy-json-windows.golden index 676b70964..8417af140 100644 --- a/tests/e2e/testdata/ls-out-legacy-json-windows.golden +++ b/tests/e2e/testdata/ls-out-legacy-json-windows.golden @@ -1 +1 @@ -{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"} +{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"} diff --git a/tests/e2e/testdata/ls-out-legacy-json.golden b/tests/e2e/testdata/ls-out-legacy-json.golden index 34d53cb0a..dadb250bb 100644 --- a/tests/e2e/testdata/ls-out-legacy-json.golden +++ b/tests/e2e/testdata/ls-out-legacy-json.golden @@ -1 +1 @@ -{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"} +{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}