~cjwatson/launchpad-buildd/currentlybuilding-permissions

« back to all changes in this revision

Viewing changes to lpbuildd/tests/test_snap.py

  • Committer: Colin Watson
  • Date: 2019-06-05 14:13:13 UTC
  • mfrom: (357.1.3 proxy-configs)
  • Revision ID: cjwatson@canonical.com-20190605141313-1bitx6ioodrxlhaz
[r=twom] Allow configuring APT or snap store proxies via a new [proxy] configuration file section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2015-2018 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2015-2019 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
__metaclass__ = type
377
377
            self.buildmanager.iterate, self.buildmanager.iterators[-1])
378
378
        self.assertFalse(self.builder.wasCalled("buildFail"))
379
379
 
 
380
    @defer.inlineCallbacks
 
381
    def test_iterate_snap_store_proxy(self):
 
382
        # The build manager can be told to use a snap store proxy.
 
383
        self.builder._config.set(
 
384
            "proxy", "snapstore", "http://snap-store-proxy.example/")
 
385
        expected_options = [
 
386
            "--snap-store-proxy-url", "http://snap-store-proxy.example/"]
 
387
        yield self.startBuild(options=expected_options)
 
388
 
380
389
    def getListenerURL(self, listener):
381
390
        port = listener.getHost().port
382
391
        return b"http://localhost:%d/" % port