@@ -11,15 +11,13 @@ import (
1111
1212func TestValidateMissingFileApplication (t * testing.T ) {
1313 dir := fs .NewDir (t , t .Name (),
14- fs .WithDir ("no-settings-app" , fs .WithFile (internal .MetadataFileName , "" ), fs .WithFile (internal .ComposeFileName , "" )),
15- fs .WithDir ("no-metadata-app" , fs .WithFile (internal .SettingsFileName , "" ), fs .WithFile (internal .ComposeFileName , "" )),
16- fs .WithDir ("no-compose-app" , fs .WithFile (internal .MetadataFileName , "" ), fs .WithFile (internal .SettingsFileName , "" )),
14+ fs .WithDir ("bad-app" ),
1715 )
1816 defer dir .Remove ()
19-
20- assert .ErrorContains (t , Validate ( dir . Join ( "no-settings-app" ), nil , nil ) , "failed to read application settings" )
21- assert .ErrorContains (t , Validate ( dir . Join ( "no-metadata-app" ), nil , nil ) , "failed to read application metadata" )
22- assert .ErrorContains (t , Validate ( dir . Join ( "no-compose-app" ), nil , nil ) , "failed to read application compose" )
17+ errs := Validate ( dir . Join ( "bad-app" ), nil , nil )
18+ assert .ErrorContains (t , errs , "failed to read application settings" )
19+ assert .ErrorContains (t , errs , "failed to read application metadata" )
20+ assert .ErrorContains (t , errs , "failed to read application compose" )
2321}
2422
2523func TestValidateBrokenMetadata (t * testing.T ) {
@@ -33,9 +31,10 @@ maintainers:
3331 - name: bad-user
3432 email: bad-email
3533unknown: property`
34+ composeFile := `version: "3.6"`
3635 dir := fs .NewDir (t , t .Name (),
3736 fs .WithFile (internal .MetadataFileName , brokenMetadata ),
38- fs .WithFile (internal .ComposeFileName , "" ),
37+ fs .WithFile (internal .ComposeFileName , composeFile ),
3938 fs .WithFile (internal .SettingsFileName , "" ))
4039 defer dir .Remove ()
4140 err := Validate (dir .Path (), nil , nil )
0 commit comments