Add support for Azure package pools

This adds support for storing packages directly on Azure, with no truly
"local" (on-disk) repo used. The existing Azure PublishedStorage
implementation was refactored to move the shared code to a separate
context struct, which can then be re-used by the new PackagePool. In
addition, the files package's mockChecksumStorage was made public so
that it could be used in the Azure PackagePool tests as well.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This commit is contained in:
Ryan Gonzalez authored and André Roth committed 2024-06-17 11:51:18 +02:00
1 parent 810df17009
commit f9325fbc91
16 files changed
+820 -148

No files matched your search

+3 -2
View File
@@ -34,7 +34,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
s.config.DatabaseOpenAttempts = 5
s.config.GpgProvider = "gpg"
s.config.PackagePoolStorage.Path = "/tmp/aptly-pool"
s.config.PackagePoolStorage.Local = &LocalPoolStorage{"/tmp/aptly-pool"}
s.config.FileSystemPublishRoots = map[string]FileSystemPublishRoot{"test": {
RootDir: "/opt/aptly-publish"}}
@@ -46,7 +46,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
s.config.SwiftPublishRoots = map[string]SwiftPublishRoot{"test": {
Container: "repo"}}
s.config.AzurePublishRoots = map[string]AzurePublishRoot{"test": {
s.config.AzurePublishRoots = map[string]AzureEndpoint{"test": {
Container: "repo"}}
s.config.LogLevel = "info"
@@ -81,6 +81,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
" \"gpgProvider\": \"gpg\",\n"+
" \"downloadSourcePackages\": false,\n"+
" \"packagePoolStorage\": {\n"+
" \"type\": \"local\",\n"+
" \"path\": \"/tmp/aptly-pool\"\n"+
" },\n"+
" \"skipLegacyPool\": false,\n"+