mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
config: allow setting PPA Base URL
This commit is contained in:
@@ -31,6 +31,7 @@ type ConfigStructure struct { // nolint: maligned
|
||||
// PPA
|
||||
PpaDistributorID string `json:"ppaDistributorID" yaml:"ppa_distributor_id"`
|
||||
PpaCodename string `json:"ppaCodename" yaml:"ppa_codename"`
|
||||
PpaBaseURL string `json:"ppaBaseURL" yaml:"ppa_baseurl"`
|
||||
|
||||
// Server
|
||||
ServeInAPIMode bool `json:"serveInAPIMode" yaml:"serve_in_api_mode"`
|
||||
@@ -235,6 +236,7 @@ var Config = ConfigStructure{
|
||||
SkipLegacyPool: false,
|
||||
PpaDistributorID: "ubuntu",
|
||||
PpaCodename: "",
|
||||
PpaBaseURL: "http://ppa.launchpad.net",
|
||||
FileSystemPublishRoots: map[string]FileSystemPublishRoot{},
|
||||
S3PublishRoots: map[string]S3PublishRoot{},
|
||||
SwiftPublishRoots: map[string]SwiftPublishRoot{},
|
||||
|
||||
@@ -85,6 +85,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
" \"dependencyVerboseResolve\": false,\n" +
|
||||
" \"ppaDistributorID\": \"\",\n" +
|
||||
" \"ppaCodename\": \"\",\n" +
|
||||
" \"ppaBaseURL\": \"\",\n" +
|
||||
" \"serveInAPIMode\": false,\n" +
|
||||
" \"enableMetricsEndpoint\": false,\n" +
|
||||
" \"enableSwaggerEndpoint\": false,\n" +
|
||||
@@ -252,6 +253,7 @@ func (s *ConfigSuite) TestSaveYAML2Config(c *C) {
|
||||
"dep_verboseresolve: false\n" +
|
||||
"ppa_distributor_id: \"\"\n" +
|
||||
"ppa_codename: \"\"\n" +
|
||||
"ppa_baseurl: \"\"\n" +
|
||||
"serve_in_api_mode: false\n" +
|
||||
"enable_metrics_endpoint: false\n" +
|
||||
"enable_swagger_endpoint: false\n" +
|
||||
@@ -308,6 +310,7 @@ dep_follow_source: true
|
||||
dep_verboseresolve: true
|
||||
ppa_distributor_id: Ubuntu
|
||||
ppa_codename: code
|
||||
ppa_baseurl: http://ppa.launchpad.net
|
||||
serve_in_api_mode: true
|
||||
enable_metrics_endpoint: true
|
||||
enable_swagger_endpoint: true
|
||||
|
||||
Reference in New Issue
Block a user