mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
publish: check if storage exists
This commit is contained in:
+3
-3
@@ -62,12 +62,12 @@ type FakeStorageProvider struct {
|
||||
storages map[string]aptly.PublishedStorage
|
||||
}
|
||||
|
||||
func (p *FakeStorageProvider) GetPublishedStorage(name string) aptly.PublishedStorage {
|
||||
func (p *FakeStorageProvider) GetPublishedStorage(name string) (aptly.PublishedStorage, error) {
|
||||
storage, ok := p.storages[name]
|
||||
if !ok {
|
||||
panic(fmt.Sprintf("unknown storage: %#v", name))
|
||||
return nil, fmt.Errorf("unknown storage: %#v", name)
|
||||
}
|
||||
return storage
|
||||
return storage, nil
|
||||
}
|
||||
|
||||
type PublishedRepoSuite struct {
|
||||
|
||||
Reference in New Issue
Block a user