From 7c47b8662f3c3a3a57faff511b0fc945ca2cfbc5 Mon Sep 17 00:00:00 2001 From: Pierig Le Saux Date: Tue, 7 Apr 2026 19:31:01 -0400 Subject: [PATCH] update --- context/context_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/context/context_test.go b/context/context_test.go index 63e0bccf..678ef103 100644 --- a/context/context_test.go +++ b/context/context_test.go @@ -2,6 +2,7 @@ package context import ( "fmt" + "os" "reflect" "testing" @@ -79,15 +80,13 @@ func (s *AptlyContextSuite) SetUpTest(c *C) { } func (s *AptlyContextSuite) TestGetPublishedStorageBadFS(c *C) { - prevConfig := utils.Config - defer func() { utils.Config = prevConfig }() - - s.context.configLoaded = true - utils.Config.FileSystemPublishRoots = map[string]utils.FileSystemPublishRoot{} - + // https://github.com/aptly-dev/aptly/issues/711 + // This will fail on account of us not having a config, so the + // storage never exists. c.Assert(func() { s.context.GetPublishedStorage("filesystem:fuji") }, FatalErrorPanicMatches, - &FatalError{ReturnCode: 1, Message: "published local storage fuji not configured"}) + &FatalError{ReturnCode: 1, Message: fmt.Sprintf("error loading config file %s/.aptly.conf: invalid yaml (EOF) or json (EOF)", + os.Getenv("HOME"))}) } func (s *AptlyContextSuite) TestGetPublishedStorageJFrogConfigured(c *C) {