mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
update
This commit is contained in:
committed by
André Roth
parent
ce070ec010
commit
7c47b8662f
@@ -2,6 +2,7 @@ package context
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -79,15 +80,13 @@ func (s *AptlyContextSuite) SetUpTest(c *C) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *AptlyContextSuite) TestGetPublishedStorageBadFS(c *C) {
|
func (s *AptlyContextSuite) TestGetPublishedStorageBadFS(c *C) {
|
||||||
prevConfig := utils.Config
|
// https://github.com/aptly-dev/aptly/issues/711
|
||||||
defer func() { utils.Config = prevConfig }()
|
// This will fail on account of us not having a config, so the
|
||||||
|
// storage never exists.
|
||||||
s.context.configLoaded = true
|
|
||||||
utils.Config.FileSystemPublishRoots = map[string]utils.FileSystemPublishRoot{}
|
|
||||||
|
|
||||||
c.Assert(func() { s.context.GetPublishedStorage("filesystem:fuji") },
|
c.Assert(func() { s.context.GetPublishedStorage("filesystem:fuji") },
|
||||||
FatalErrorPanicMatches,
|
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) {
|
func (s *AptlyContextSuite) TestGetPublishedStorageJFrogConfigured(c *C) {
|
||||||
|
|||||||
Reference in New Issue
Block a user