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
599aa1a8
Kaydet (Commit)
599aa1a8
authored
Mar 28, 2017
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Mar 28, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1536 from docker/2.2.1-release
2.2.1 release
üst
b474ea2f
4a51e787
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
88 additions
and
8 deletions
+88
-8
daemon.py
docker/api/daemon.py
+2
-1
errors.py
docker/errors.py
+1
-1
version.py
docker/version.py
+1
-1
change-log.md
docs/change-log.md
+12
-0
containers.rst
docs/containers.rst
+1
-0
secrets.rst
docs/secrets.rst
+1
-0
api_service_test.py
tests/integration/api_service_test.py
+2
-2
api_test.py
tests/unit/api_test.py
+3
-3
errors_test.py
tests/unit/errors_test.py
+65
-0
No files found.
docker/api/daemon.py
Dosyayı görüntüle @
599aa1a8
...
...
@@ -68,9 +68,10 @@ class DaemonApiMixin(object):
'until'
:
until
,
'filters'
:
filters
}
url
=
self
.
_url
(
'/events'
)
return
self
.
_stream_helper
(
self
.
_get
(
self
.
_url
(
'/events'
),
params
=
params
,
stream
=
Tru
e
),
self
.
_get
(
url
,
params
=
params
,
stream
=
True
,
timeout
=
Non
e
),
decode
=
decode
)
...
...
docker/errors.py
Dosyayı görüntüle @
599aa1a8
...
...
@@ -59,7 +59,7 @@ class APIError(requests.exceptions.HTTPError, DockerException):
@property
def
status_code
(
self
):
if
self
.
response
:
if
self
.
response
is
not
None
:
return
self
.
response
.
status_code
def
is_client_error
(
self
):
...
...
docker/version.py
Dosyayı görüntüle @
599aa1a8
version
=
"2.2.
0
"
version
=
"2.2.
1
"
version_info
=
tuple
([
int
(
d
)
for
d
in
version
.
split
(
"-"
)[
0
]
.
split
(
"."
)])
docs/change-log.md
Dosyayı görüntüle @
599aa1a8
Change log
==========
2.
2.1
-----
[
List of PRs / issues for this release
](
https://github.com/docker/docker-py/milestone/32?closed=1
)
### Bugfixes
*
Fixed a bug where the
`status_code`
attribute of
`APIError`
exceptions would
not reflect the expected value.
*
Fixed an issue where the
`events`
method would time out unexpectedly if no
data was sent by the engine for a given amount of time.
2.
2.0
-----
...
...
docs/containers.rst
Dosyayı görüntüle @
599aa1a8
...
...
@@ -40,6 +40,7 @@ Container objects
.. automethod:: logs
.. automethod:: pause
.. automethod:: put_archive
.. automethod:: reload
.. automethod:: remove
.. automethod:: rename
.. automethod:: resize
...
...
docs/secrets.rst
Dosyayı görüntüle @
599aa1a8
...
...
@@ -26,4 +26,5 @@ Secret objects
The raw representation of this object from the server.
.. automethod:: reload
.. automethod:: remove
tests/integration/api_service_test.py
Dosyayı görüntüle @
599aa1a8
...
...
@@ -363,7 +363,7 @@ class ServiceTest(BaseAPIIntegrationTest):
self
.
tmp_secrets
.
append
(
secret_id
)
secret_ref
=
docker
.
types
.
SecretReference
(
secret_id
,
secret_name
)
container_spec
=
docker
.
types
.
ContainerSpec
(
'busybox'
,
[
'
top
'
],
secrets
=
[
secret_ref
]
'busybox'
,
[
'
sleep'
,
'999
'
],
secrets
=
[
secret_ref
]
)
task_tmpl
=
docker
.
types
.
TaskTemplate
(
container_spec
)
name
=
self
.
get_service_name
()
...
...
@@ -388,7 +388,7 @@ class ServiceTest(BaseAPIIntegrationTest):
self
.
tmp_secrets
.
append
(
secret_id
)
secret_ref
=
docker
.
types
.
SecretReference
(
secret_id
,
secret_name
)
container_spec
=
docker
.
types
.
ContainerSpec
(
'busybox'
,
[
'
top
'
],
secrets
=
[
secret_ref
]
'busybox'
,
[
'
sleep'
,
'999
'
],
secrets
=
[
secret_ref
]
)
task_tmpl
=
docker
.
types
.
TaskTemplate
(
container_spec
)
name
=
self
.
get_service_name
()
...
...
tests/unit/api_test.py
Dosyayı görüntüle @
599aa1a8
...
...
@@ -229,7 +229,7 @@ class DockerApiTest(BaseAPIClientTest):
url_prefix
+
'events'
,
params
=
{
'since'
:
None
,
'until'
:
None
,
'filters'
:
None
},
stream
=
True
,
timeout
=
DEFAULT_TIMEOUT_SECONDS
timeout
=
None
)
def
test_events_with_since_until
(
self
):
...
...
@@ -249,7 +249,7 @@ class DockerApiTest(BaseAPIClientTest):
'filters'
:
None
},
stream
=
True
,
timeout
=
DEFAULT_TIMEOUT_SECONDS
timeout
=
None
)
def
test_events_with_filters
(
self
):
...
...
@@ -268,7 +268,7 @@ class DockerApiTest(BaseAPIClientTest):
'filters'
:
expected_filters
},
stream
=
True
,
timeout
=
DEFAULT_TIMEOUT_SECONDS
timeout
=
None
)
def
_socket_path_for_client_session
(
self
,
client
):
...
...
tests/unit/errors_test.py
Dosyayı görüntüle @
599aa1a8
import
unittest
import
requests
from
docker.errors
import
(
APIError
,
DockerException
,
create_unexpected_kwargs_error
)
...
...
@@ -11,6 +13,69 @@ class APIErrorTest(unittest.TestCase):
except
DockerException
:
pass
def
test_status_code_200
(
self
):
"""The status_code property is present with 200 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
200
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
status_code
==
200
def
test_status_code_400
(
self
):
"""The status_code property is present with 400 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
400
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
status_code
==
400
def
test_status_code_500
(
self
):
"""The status_code property is present with 500 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
500
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
status_code
==
500
def
test_is_server_error_200
(
self
):
"""Report not server error on 200 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
200
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
is_server_error
()
is
False
def
test_is_server_error_300
(
self
):
"""Report not server error on 300 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
300
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
is_server_error
()
is
False
def
test_is_server_error_400
(
self
):
"""Report not server error on 400 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
400
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
is_server_error
()
is
False
def
test_is_server_error_500
(
self
):
"""Report server error on 500 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
500
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
is_server_error
()
is
True
def
test_is_client_error_500
(
self
):
"""Report not client error on 500 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
500
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
is_client_error
()
is
False
def
test_is_client_error_400
(
self
):
"""Report client error on 400 response."""
resp
=
requests
.
Response
()
resp
.
status_code
=
400
err
=
APIError
(
''
,
response
=
resp
)
assert
err
.
is_client_error
()
is
True
class
CreateUnexpectedKwargsErrorTest
(
unittest
.
TestCase
):
def
test_create_unexpected_kwargs_error_single
(
self
):
...
...
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