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
f27ecf3f
Kaydet (Commit)
f27ecf3f
authored
May 08, 2017
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add ContainerSpec mounts test
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
370cdb6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
dockertypes_test.py
tests/unit/dockertypes_test.py
+18
-2
No files found.
tests/unit/dockertypes_test.py
Dosyayı görüntüle @
f27ecf3f
...
...
@@ -8,8 +8,8 @@ import pytest
from
docker.constants
import
DEFAULT_DOCKER_API_VERSION
from
docker.errors
import
InvalidArgument
,
InvalidVersion
from
docker.types
import
(
ContainerConfig
,
EndpointConfig
,
HostConfig
,
IPAMConfig
,
IPAMPool
,
LogConfig
,
Mount
,
ServiceMode
,
Ulimit
,
ContainerConfig
,
ContainerSpec
,
EndpointConfig
,
HostConfig
,
IPAMConfig
,
IPAMPool
,
LogConfig
,
Mount
,
ServiceMode
,
Ulimit
,
)
try
:
...
...
@@ -220,6 +220,22 @@ class ContainerConfigTest(unittest.TestCase):
assert
'The volume_driver option has been moved'
in
str
(
w
[
0
]
.
message
)
class
ContainerSpecTest
(
unittest
.
TestCase
):
def
test_parse_mounts
(
self
):
spec
=
ContainerSpec
(
image
=
'scratch'
,
mounts
=
[
'/local:/container'
,
'/local2:/container2:ro'
,
Mount
(
target
=
'/target'
,
source
=
'/source'
)
]
)
assert
'Mounts'
in
spec
assert
len
(
spec
[
'Mounts'
])
==
3
for
mount
in
spec
[
'Mounts'
]:
assert
isinstance
(
mount
,
Mount
)
class
UlimitTest
(
unittest
.
TestCase
):
def
test_create_host_config_dict_ulimit
(
self
):
ulimit_dct
=
{
'name'
:
'nofile'
,
'soft'
:
8096
}
...
...
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