New upstream version 1.5.0+ds1

This commit is contained in:
Roland Mas
2023-01-02 14:19:29 +01:00
parent 29e4ea6ec0
commit 5c4f97f88e
324 changed files with 15360 additions and 6668 deletions
+22 -2
View File
@@ -23,6 +23,7 @@ func (s *ConfigSuite) TestLoadConfig(c *C) {
c.Assert(err, IsNil)
c.Check(s.config.RootDir, Equals, "/opt/aptly/")
c.Check(s.config.DownloadConcurrency, Equals, 33)
c.Check(s.config.DatabaseOpenAttempts, Equals, 33)
}
func (s *ConfigSuite) TestSaveConfig(c *C) {
@@ -30,6 +31,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
s.config.RootDir = "/tmp/aptly"
s.config.DownloadConcurrency = 5
s.config.DatabaseOpenAttempts = 5
s.config.GpgProvider = "gpg"
s.config.FileSystemPublishRoots = map[string]FileSystemPublishRoot{"test": {
@@ -42,6 +44,9 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
s.config.SwiftPublishRoots = map[string]SwiftPublishRoot{"test": {
Container: "repo"}}
s.config.AzurePublishRoots = map[string]AzurePublishRoot{"test": {
Container: "repo"}}
err := SaveConfig(configname, &s.config)
c.Assert(err, IsNil)
@@ -57,6 +62,9 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
" \"rootDir\": \"/tmp/aptly\",\n"+
" \"downloadConcurrency\": 5,\n"+
" \"downloadSpeedLimit\": 0,\n"+
" \"downloadRetries\": 0,\n"+
" \"downloader\": \"\",\n"+
" \"databaseOpenAttempts\": 5,\n"+
" \"architectures\": null,\n"+
" \"dependencyFollowSuggests\": false,\n"+
" \"dependencyFollowRecommends\": false,\n"+
@@ -71,6 +79,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
" \"ppaDistributorID\": \"\",\n"+
" \"ppaCodename\": \"\",\n"+
" \"skipContentsPublishing\": false,\n"+
" \"skipBz2Publishing\": false,\n"+
" \"FileSystemPublishEndpoints\": {\n"+
" \"test\": {\n"+
" \"rootDir\": \"/opt/aptly-publish\",\n"+
@@ -110,8 +119,19 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
" \"prefix\": \"\",\n"+
" \"container\": \"repo\"\n"+
" }\n"+
" }\n"+
" },\n"+
" \"AzurePublishEndpoints\": {\n"+
" \"test\": {\n"+
" \"accountName\": \"\",\n"+
" \"accountKey\": \"\",\n"+
" \"container\": \"repo\",\n"+
" \"prefix\": \"\",\n"+
" \"endpoint\": \"\"\n"+
" }\n"+
" },\n"+
" \"AsyncAPI\": false,\n"+
" \"enableMetricsEndpoint\": false\n"+
"}")
}
const configFile = `{"rootDir": "/opt/aptly/", "downloadConcurrency": 33}`
const configFile = `{"rootDir": "/opt/aptly/", "downloadConcurrency": 33, "databaseOpenAttempts": 33}`