launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #20165
[Merge] lp:~wgrant/launchpad/gpgservice-api-url into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/gpgservice-api-url into lp:launchpad.
Commit message:
Turn gpgservice.api_endpoint into a full URL like the other *_endpoints.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/gpgservice-api-url/+merge/290391
Turn gpgservice.api_endpoint into a full URL like the other *_endpoints.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/gpgservice-api-url into lp:launchpad.
=== modified file 'lib/lp/services/config/schema-lazr.conf'
--- lib/lp/services/config/schema-lazr.conf 2016-02-16 03:12:53 +0000
+++ lib/lp/services/config/schema-lazr.conf 2016-03-30 03:54:07 +0000
@@ -782,9 +782,9 @@
maps_api_key:
[gpgservice]
-# The ip_address:port we can contact the gpgservice http api.
+# The URL of the gpgservice API endpoint.
# datatype: string
-api_endpoint:
+api_endpoint: http://gpgservice.invalid/
[gpghandler]
# Should we allow uploading keys to the keyserver?
=== modified file 'lib/lp/services/gpg/handler.py'
--- lib/lp/services/gpg/handler.py 2016-03-23 17:55:39 +0000
+++ lib/lp/services/gpg/handler.py 2016-03-30 03:54:07 +0000
@@ -640,7 +640,7 @@
"""See IGPGClient."""
def get_endpoint(self):
- return "http://{}".format(config.gpgservice.api_endpoint)
+ return config.gpgservice.api_endpoint
def get_timeout(self):
return 30.0
=== modified file 'lib/lp/testing/gpgservice/_fixture.py'
--- lib/lp/testing/gpgservice/_fixture.py 2016-03-21 05:37:40 +0000
+++ lib/lp/testing/gpgservice/_fixture.py 2016-03-30 03:54:07 +0000
@@ -67,7 +67,7 @@
if self._config_fixture is not None:
config_section = service_config = dedent("""\
[gpgservice]
- api_endpoint: %s
+ api_endpoint: http://%s/
""" % self.bind_address)
self._config_fixture.add_section(config_section)
config.reloadConfig()
=== modified file 'lib/lp/testing/gpgservice/tests/test_fixture.py'
--- lib/lp/testing/gpgservice/tests/test_fixture.py 2016-03-21 05:37:40 +0000
+++ lib/lp/testing/gpgservice/tests/test_fixture.py 2016-03-30 03:54:07 +0000
@@ -65,4 +65,5 @@
gpg_fixture = self.useFixture(GPGKeyServiceFixture(config_fixture))
self.assertEqual(
- gpg_fixture.bind_address, config.gpgservice.api_endpoint)
+ 'http://%s/' % gpg_fixture.bind_address,
+ config.gpgservice.api_endpoint)
Follow ups