summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVincent Giersch <vincent.giersch@ovh.net>2015-02-04 16:22:17 +0000
committerVincent Giersch <vincent.giersch@ovh.net>2015-02-04 16:26:55 +0000
commitf3717f5815d432a9afdccad2e748b1b4ffab0651 (patch)
treedb4033f81625fb48bb2fd95d29dce25483f3cf91 /tests
parent39ee2d55b2df24865095e032a50210aa42aa743a (diff)
downloaddocker-py-f3717f5815d432a9afdccad2e748b1b4ffab0651.tar.gz
Fix crash when building from remote sources
Avoid crashing when the Docker python client is able to load registry credentials when building using a remote source Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test.py b/tests/test.py
index 7ada2a9..bf9e254 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -2003,6 +2003,20 @@ class DockerClientTest(Cleanup, unittest.TestCase):
except Exception as e:
self.fail('Command should not raise exception: {0}'.format(e))
+ def test_build_remote_with_registry_auth(self):
+ try:
+ self.client._auth_configs = {
+ 'https://example.com': {
+ 'user': 'example',
+ 'password': 'example',
+ 'email': 'example@example.com'
+ }
+ }
+
+ self.client.build(path='https://github.com/docker-library/mongo')
+ except Exception as e:
+ self.fail('Command should not raise exception: {0}'.format(e))
+
#######################
# PY SPECIFIC TESTS #
#######################