Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
a4c251d2
Unverified
Kaydet (Commit)
a4c251d2
authored
Mar 28, 2019
tarafından
Ulysses Souza
Kaydeden (comit)
GitHub
Mar 28, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #2299 from ulyssessouza/3.7.2-release
Bump 3.7.2 release
üst
cb8b4626
8f2d9a56
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
16 deletions
+27
-16
utils.py
docker/utils/utils.py
+1
-3
version.py
docker/version.py
+1
-1
change-log.md
docs/change-log.md
+11
-0
versions.py
scripts/versions.py
+3
-7
api_container_test.py
tests/integration/api_container_test.py
+3
-1
utils_test.py
tests/unit/utils_test.py
+8
-4
No files found.
docker/utils/utils.py
Dosyayı görüntüle @
a4c251d2
...
...
@@ -352,9 +352,7 @@ def kwargs_from_env(ssl_version=None, assert_hostname=None, environment=None):
params
=
{}
if
host
:
params
[
'base_url'
]
=
(
host
.
replace
(
'tcp://'
,
'https://'
)
if
enable_tls
else
host
)
params
[
'base_url'
]
=
host
if
not
enable_tls
:
return
params
...
...
docker/version.py
Dosyayı görüntüle @
a4c251d2
version
=
"3.7.
1
"
version
=
"3.7.
2
"
version_info
=
tuple
([
int
(
d
)
for
d
in
version
.
split
(
"-"
)[
0
]
.
split
(
"."
)])
docs/change-log.md
Dosyayı görüntüle @
a4c251d2
Change log
==========
3.
7.2
-----
[
List of PRs / issues for this release
](
https://github.com/docker/docker-py/milestone/59?closed=1
)
### Bugfixes
*
Fix base_url to keep TCP protocol on utils.py by letting the responsability of changing the
protocol to
`parse_host`
afterwards, letting
`base_url`
with the original value.
*
XFAIL test_attach_stream_and_cancel on TLS
3.
7.1
-----
...
...
scripts/versions.py
Dosyayı görüntüle @
a4c251d2
...
...
@@ -62,13 +62,9 @@ def main():
for
url
in
[
base_url
.
format
(
cat
)
for
cat
in
categories
]:
res
=
requests
.
get
(
url
)
content
=
res
.
text
versions
=
[
Version
.
parse
(
v
.
strip
(
'"'
)
.
lstrip
(
'docker-'
)
.
rstrip
(
'.tgz'
)
.
rstrip
(
'-x86_64'
)
)
for
v
in
re
.
findall
(
r'"docker-[0-9]+\.[0-9]+\.[0-9]+-?.*tgz"'
,
content
)
]
versions
=
[
Version
.
parse
(
v
)
for
v
in
re
.
findall
(
r'"docker-([0-9]+\.[0-9]+\.[0-9]+)-?.*tgz"'
,
content
)]
sorted_versions
=
sorted
(
versions
,
reverse
=
True
,
key
=
operator
.
attrgetter
(
'order'
)
)
...
...
tests/integration/api_container_test.py
Dosyayı görüntüle @
a4c251d2
...
...
@@ -1080,7 +1080,6 @@ class KillTest(BaseAPIIntegrationTest):
class
PortTest
(
BaseAPIIntegrationTest
):
def
test_port
(
self
):
port_bindings
=
{
'1111'
:
(
'127.0.0.1'
,
'4567'
),
'2222'
:
(
'127.0.0.1'
,
'4568'
)
...
...
@@ -1260,6 +1259,9 @@ class AttachContainerTest(BaseAPIIntegrationTest):
@pytest.mark.timeout
(
5
)
@pytest.mark.skipif
(
os
.
environ
.
get
(
'DOCKER_HOST'
,
''
)
.
startswith
(
'ssh://'
),
reason
=
'No cancellable streams over SSH'
)
@pytest.mark.xfail
(
condition
=
os
.
environ
.
get
(
'DOCKER_TLS_VERIFY'
)
or
os
.
environ
.
get
(
'DOCKER_CERT_PATH'
),
reason
=
'Flaky test on TLS'
)
def
test_attach_stream_and_cancel
(
self
):
container
=
self
.
client
.
create_container
(
BUSYBOX
,
'sh -c "echo hello && sleep 60"'
,
...
...
tests/unit/utils_test.py
Dosyayı görüntüle @
a4c251d2
...
...
@@ -11,6 +11,7 @@ import unittest
from
docker.api.client
import
APIClient
from
docker.constants
import
IS_WINDOWS_PLATFORM
from
docker.errors
import
DockerException
from
docker.utils
import
(
convert_filters
,
convert_volume_binds
,
decode_json_header
,
kwargs_from_env
,
...
...
@@ -83,15 +84,17 @@ class KwargsFromEnvTest(unittest.TestCase):
DOCKER_CERT_PATH
=
TEST_CERT_DIR
,
DOCKER_TLS_VERIFY
=
'1'
)
kwargs
=
kwargs_from_env
(
assert_hostname
=
False
)
assert
'
https
://192.168.59.103:2376'
==
kwargs
[
'base_url'
]
assert
'
tcp
://192.168.59.103:2376'
==
kwargs
[
'base_url'
]
assert
'ca.pem'
in
kwargs
[
'tls'
]
.
ca_cert
assert
'cert.pem'
in
kwargs
[
'tls'
]
.
cert
[
0
]
assert
'key.pem'
in
kwargs
[
'tls'
]
.
cert
[
1
]
assert
kwargs
[
'tls'
]
.
assert_hostname
is
False
assert
kwargs
[
'tls'
]
.
verify
parsed_host
=
parse_host
(
kwargs
[
'base_url'
],
IS_WINDOWS_PLATFORM
,
True
)
try
:
client
=
APIClient
(
**
kwargs
)
assert
kwargs
[
'base_url'
]
==
client
.
base_url
assert
parsed_host
==
client
.
base_url
assert
kwargs
[
'tls'
]
.
ca_cert
==
client
.
verify
assert
kwargs
[
'tls'
]
.
cert
==
client
.
cert
except
TypeError
as
e
:
...
...
@@ -102,15 +105,16 @@ class KwargsFromEnvTest(unittest.TestCase):
DOCKER_CERT_PATH
=
TEST_CERT_DIR
,
DOCKER_TLS_VERIFY
=
''
)
kwargs
=
kwargs_from_env
(
assert_hostname
=
True
)
assert
'
https
://192.168.59.103:2376'
==
kwargs
[
'base_url'
]
assert
'
tcp
://192.168.59.103:2376'
==
kwargs
[
'base_url'
]
assert
'ca.pem'
in
kwargs
[
'tls'
]
.
ca_cert
assert
'cert.pem'
in
kwargs
[
'tls'
]
.
cert
[
0
]
assert
'key.pem'
in
kwargs
[
'tls'
]
.
cert
[
1
]
assert
kwargs
[
'tls'
]
.
assert_hostname
is
True
assert
kwargs
[
'tls'
]
.
verify
is
False
parsed_host
=
parse_host
(
kwargs
[
'base_url'
],
IS_WINDOWS_PLATFORM
,
True
)
try
:
client
=
APIClient
(
**
kwargs
)
assert
kwargs
[
'base_url'
]
==
client
.
base_url
assert
parsed_host
==
client
.
base_url
assert
kwargs
[
'tls'
]
.
cert
==
client
.
cert
assert
not
kwargs
[
'tls'
]
.
verify
except
TypeError
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment