summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2019-01-09 14:38:53 -0800
committerJoffrey F <joffrey@docker.com>2019-01-09 14:45:13 -0800
commita579e9e20578ca9a074b28865ff594ed02fba6b3 (patch)
tree24165632ebfe3ca707e4675b0039d31ae3830aed /tests/integration
parent1073b7364846709ad005e7991045d38365d911c9 (diff)
downloaddocker-py-proxy_env_fixes.tar.gz
Remove use_config_proxy from exec. Add use_config_proxy docs to DockerClientproxy_env_fixes
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/models_containers_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/integration/models_containers_test.py b/tests/integration/models_containers_test.py
index b48f6fb..92eca36 100644
--- a/tests/integration/models_containers_test.py
+++ b/tests/integration/models_containers_test.py
@@ -163,6 +163,19 @@ class ContainerCollectionTest(BaseIntegrationTest):
assert logs[0] == b'hello\n'
assert logs[1] == b'world\n'
+ def test_run_with_proxy_config(self):
+ client = docker.from_env(version=TEST_API_VERSION)
+ client.api._proxy_configs = docker.utils.proxy.ProxyConfig(
+ ftp='sakuya.jp:4967'
+ )
+
+ out = client.containers.run(
+ 'alpine', 'sh -c "env"', use_config_proxy=True
+ )
+
+ assert b'FTP_PROXY=sakuya.jp:4967\n' in out
+ assert b'ftp_proxy=sakuya.jp:4967\n' in out
+
def test_get(self):
client = docker.from_env(version=TEST_API_VERSION)
container = client.containers.run("alpine", "sleep 300", detach=True)