← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~lgp171188/launchpad:mirror-prober-sni-fix into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/registry/tests/test_distributionmirror_prober.py b/lib/lp/registry/tests/test_distributionmirror_prober.py
> index aed0097..d63904b 100644
> --- a/lib/lp/registry/tests/test_distributionmirror_prober.py
> +++ b/lib/lp/registry/tests/test_distributionmirror_prober.py
> @@ -259,22 +260,6 @@ class TestProberHTTPSProtocolAndFactory(TestCase):
>  
>          return deferred.addCallback(got_result)
>  
> -    def test_https_prober_uses_proxy(self):

This test had to be moved to its own class because the `TestProberHTTPSProtocolAndFactory` test class is run by a runner that expects tests to return a deferred. This test doesn't. And for some reason all failures, errors, and exceptions within this test are masked as a result. Moving it out to a separate test class without the twisted-based runner, fixes that.

> -        proxy_port = 6654
> -        self.pushConfig(
> -            "launchpad", http_proxy="http://localhost:%s"; % proxy_port
> -        )
> -
> -        url = "https://localhost:%s/valid-mirror/file"; % self.port
> -        prober = RedirectAwareProberFactory(url, timeout=0.5)
> -        self.assertEqual(prober.url, url)
> -
> -        # We just want to check that it did the request using the correct
> -        # Agent, pointing to the correct proxy config.
> -        agent = prober.getHttpsClient()._agent
> -        self.assertIsInstance(agent, TunnelingAgent)
> -        self.assertEqual(("localhost", proxy_port, None), agent._proxyConf)
> -
>      def test_https_fails_on_invalid_certificates(self):
>          """Changes set back the default browser-like policy for HTTPS
>          request and make sure the request is failing due to invalid


-- 
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/474546
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:mirror-prober-sni-fix into launchpad:master.



References