DockerCLI/cli-plugins
Sebastiaan van Stijn 5aba4860de
cli-plugins/manager: TestPluginError: don't use yaml.Marshal
The test used  `gopkg.in/yaml.v2` to verify the TextMarshaller implementation,
which was implemented to allow printing the errors in JSON formatted output;

> This exists primarily to implement encoding.TextMarshaller such that
> rendering a plugin as JSON (e.g. for `docker info -f '{{json .CLIPlugins}}'`)
> renders the Err field as a useful string and not just `{}`.

Given that both yaml.Marshal and json.Marshal use this, we may as well use
Go's stdlib.

While updating, also changed some of the assertions to checks, so that we don't
fail the test early.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-17 13:17:51 +01:00
..
examples/helloworld Always enable experimental features 2020-10-02 15:59:42 +02:00
manager cli-plugins/manager: TestPluginError: don't use yaml.Marshal 2022-11-17 13:17:51 +01:00
plugin Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00