add test and improve config error messages

This commit is contained in:
André Roth
2024-12-04 12:14:00 +01:00
parent eb6dd4d69e
commit a7d6782176
4 changed files with 27 additions and 10 deletions
+1 -1
View File
@@ -84,6 +84,6 @@ func (s *AptlyContextSuite) TestGetPublishedStorageBadFS(c *C) {
// storage never exists.
c.Assert(func() { s.context.GetPublishedStorage("filesystem:fuji") },
FatalErrorPanicMatches,
&FatalError{ReturnCode: 1, Message: fmt.Sprintf("error loading config file %s/.aptly.conf: not valid yaml or json",
&FatalError{ReturnCode: 1, Message: fmt.Sprintf("error loading config file %s/.aptly.conf: invalid yaml (EOF) or json (EOF)",
os.Getenv("HOME"))})
}