mirror of https://github.com/docker/cli.git
Merge pull request #4760 from thaJeztah/improve_asserts
cli/compose/loader: use golden.Assert() for readability
This commit is contained in:
commit
cfe18f5e03
|
@ -17,7 +17,7 @@ func TestMarshallConfig(t *testing.T) {
|
|||
|
||||
actual, err := yaml.Marshal(cfg)
|
||||
assert.NilError(t, err)
|
||||
golden.AssertBytes(t, actual, "full-example.yaml.golden")
|
||||
golden.Assert(t, string(actual), "full-example.yaml.golden")
|
||||
|
||||
// Make sure the expected can be parsed.
|
||||
yamlData, err := os.ReadFile("testdata/full-example.yaml.golden")
|
||||
|
@ -34,7 +34,7 @@ func TestJSONMarshallConfig(t *testing.T) {
|
|||
cfg := fullExampleConfig(workingDir, homeDir)
|
||||
actual, err := json.MarshalIndent(cfg, "", " ")
|
||||
assert.NilError(t, err)
|
||||
golden.AssertBytes(t, actual, "full-example.json.golden")
|
||||
golden.Assert(t, string(actual), "full-example.json.golden")
|
||||
|
||||
jsonData, err := os.ReadFile("testdata/full-example.json.golden")
|
||||
assert.NilError(t, err)
|
||||
|
|
Loading…
Reference in New Issue