File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ import (
88 "gotest.tools/v3/assert"
99)
1010
11- func dumpJSON (d interface {}) string {
11+ func dumpJSON (t * testing. T , d interface {}) string {
1212 b , err := json .Marshal (d )
1313 if err != nil {
14- return "ERROR"
14+ t . Fatal ( err )
1515 }
1616 return string (b )
1717}
@@ -20,7 +20,7 @@ const emptyYAML = "images: []\n"
2020
2121func TestEmptyYAML (t * testing.T ) {
2222 var y LimaYAML
23- t .Log (dumpJSON (y ))
23+ t .Log (dumpJSON (t , y ))
2424 b , err := marshalYAML (y )
2525 assert .NilError (t , err )
2626 assert .Equal (t , string (b ), emptyYAML )
@@ -36,7 +36,7 @@ func TestDefaultYAML(t *testing.T) {
3636 assert .NilError (t , err )
3737 y .Images = nil // remove default images
3838 y .Mounts = nil // remove default mounts
39- t .Log (dumpJSON (y ))
39+ t .Log (dumpJSON (t , y ))
4040 b , err := marshalYAML (y )
4141 assert .NilError (t , err )
4242 assert .Equal (t , string (b ), defaultYAML )
You can’t perform that action at this time.
0 commit comments