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
663c6089
Kaydet (Commit)
663c6089
authored
Ock 03, 2018
tarafından
Felipe Ruhland
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix test to make sure the initial mode is replicated
Signed-off-by:
Felipe Ruhland
<
felipe.ruhland@gmail.com
>
üst
0e0a8526
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
services.py
docker/models/services.py
+1
-1
models_services_test.py
tests/integration/models_services_test.py
+2
-2
No files found.
docker/models/services.py
Dosyayı görüntüle @
663c6089
...
...
@@ -116,7 +116,7 @@ class Service(Model):
``True``if successful.
"""
if
not
self
.
attrs
[
'Spec'
][
'Mode'
]
.
get
(
'Global'
):
if
'Global'
in
self
.
attrs
[
'Spec'
][
'Mode'
]
.
keys
(
):
raise
InvalidArgument
(
'Cannot scale a global container'
)
service_mode
=
ServiceMode
(
'replicated'
,
replicas
)
...
...
tests/integration/models_services_test.py
Dosyayı görüntüle @
663c6089
...
...
@@ -5,7 +5,7 @@ import docker
from
..
import
helpers
from
.base
import
TEST_API_VERSION
from
docker.errors
import
InvalidArgument
from
docker.
model
s.services
import
ServiceMode
from
docker.
type
s.services
import
ServiceMode
class
ServiceTest
(
unittest
.
TestCase
):
...
...
@@ -212,7 +212,7 @@ class ServiceTest(unittest.TestCase):
name
=
helpers
.
random_name
(),
# ContainerSpec arguments
image
=
"alpine"
,
command
=
"sleep 300"
command
=
"sleep 300"
,
)
tasks
=
[]
while
len
(
tasks
)
==
0
:
...
...
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