MCPcopy
hub / github.com/docker/docker-py / test_build_with_proxy

Method test_build_with_proxy

tests/ssh/api_build_test.py:16–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14
15class BuildTest(BaseAPIIntegrationTest):
16 def test_build_with_proxy(self):
17 self.client._proxy_configs = ProxyConfig(
18 ftp='a', http='b', https='c', no_proxy='d'
19 )
20
21 script = io.BytesIO('\n'.join([
22 'FROM busybox',
23 'RUN env | grep "FTP_PROXY=a"',
24 'RUN env | grep "ftp_proxy=a"',
25 'RUN env | grep "HTTP_PROXY=b"',
26 'RUN env | grep "http_proxy=b"',
27 'RUN env | grep "HTTPS_PROXY=c"',
28 'RUN env | grep "https_proxy=c"',
29 'RUN env | grep "NO_PROXY=d"',
30 'RUN env | grep "no_proxy=d"',
31 ]).encode('ascii'))
32
33 self.client.build(fileobj=script, decode=True)
34
35 def test_build_with_proxy_and_buildargs(self):
36 self.client._proxy_configs = ProxyConfig(

Callers

nothing calls this directly

Calls 3

ProxyConfigClass · 0.90
joinMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected