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
8fd9d3c9
Kaydet (Commit)
8fd9d3c9
authored
Şub 21, 2018
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
GenericResources was introduced in 1.32
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
f40079d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
service.py
docker/api/service.py
+2
-2
api_service_test.py
tests/integration/api_service_test.py
+2
-1
No files found.
docker/api/service.py
Dosyayı görüntüle @
8fd9d3c9
...
...
@@ -74,9 +74,9 @@ def _check_api_features(version, task_template, update_config, endpoint_spec):
raise_version_error
(
'ContainerSpec.isolation'
,
'1.35'
)
if
task_template
.
get
(
'Resources'
):
if
utils
.
version_lt
(
version
,
'1.3
5
'
):
if
utils
.
version_lt
(
version
,
'1.3
2
'
):
if
task_template
[
'Resources'
]
.
get
(
'GenericResources'
):
raise_version_error
(
'Resources.generic_resources'
,
'1.3
5
'
)
raise_version_error
(
'Resources.generic_resources'
,
'1.3
2
'
)
def
_merge_task_template
(
current
,
override
):
...
...
tests/integration/api_service_test.py
Dosyayı görüntüle @
8fd9d3c9
...
...
@@ -226,7 +226,7 @@ class ServiceTest(BaseAPIIntegrationTest):
svc_id
=
self
.
client
.
create_service
(
task_tmpl
,
name
=
name
)
return
resources
,
self
.
client
.
inspect_service
(
svc_id
)
@requires_api_version
(
'1.3
5
'
)
@requires_api_version
(
'1.3
2
'
)
def
test_create_service_with_generic_resources
(
self
):
successful
=
[{
'input'
:
[
...
...
@@ -258,6 +258,7 @@ class ServiceTest(BaseAPIIntegrationTest):
expected
=
test
.
get
(
'expected'
,
test
[
'input'
])
assert
sorted
(
actual
,
key
=
_key
)
==
sorted
(
expected
,
key
=
_key
)
@requires_api_version
(
'1.32'
)
def
test_create_service_with_invalid_generic_resources
(
self
):
for
test_input
in
[
'1'
,
1.0
,
lambda
:
'1'
,
{
1
,
2
}]:
with
pytest
.
raises
(
docker
.
errors
.
InvalidArgument
):
...
...
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