Skip to content

Commit

Permalink
Merge pull request #4760 from thaJeztah/improve_asserts
Browse files Browse the repository at this point in the history
cli/compose/loader: use golden.Assert() for readability
  • Loading branch information
thaJeztah committed Jan 8, 2024
2 parents 5c6ca07 + 26f59b2 commit cfe18f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/compose/loader/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down

0 comments on commit cfe18f5

Please sign in to comment.