DockerCLI/cli/command/context/testdata
Sebastiaan van Stijn fed9fa0f72
context list: temporarily add ContextType to JSON output
Docker Desktop currently ships with the "cloud integration" wrapper,
which outputs an additional ContextType field in the JSON output.

While this field is non-standard, it made its way into Visual Studio's
Docker integration, which uses this to exclude "aci" and "eci" context
types that are not supported by Visual Studio.

This patch;

- conditionally adds a ContextType field to the JSON output
- but ONLY when using the default "{{json .}}" or "json" formats
  (which are the formats used by Visual Studio)
- if the context is a "aci" or "eci" context, that type is
  preserved, otherwise the default "moby" type is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-31 13:08:31 +02:00
..
inspect.golden cli/command/context: test inspecting context with custom metadata 2024-05-31 10:49:50 +02:00
list-json-name.golden cli/command/context: list: add test for JSON output 2024-05-31 10:54:15 +02:00
list-json.golden context list: temporarily add ContextType to JSON output 2024-05-31 13:08:31 +02:00
list-with-error.golden cli/command/context: context ls: always show current context 2022-11-28 23:41:29 +01:00
list.golden cli/command/context: context ls: always show current context 2022-11-28 23:41:29 +01:00
quiet-list.golden Make default context behaves like a real context: 2019-03-18 11:45:46 +01:00
show.golden introduce `context show` command 2022-04-25 14:40:24 +02:00