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
1fb2db49
Kaydet (Commit)
1fb2db49
authored
Eyl 09, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make integration tests more CI-friendly.
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
cfbc967c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
17 deletions
+10
-17
Makefile
Makefile
+0
-1
integration_test.py
tests/integration_test.py
+10
-16
No files found.
Makefile
Dosyayı görüntüle @
1fb2db49
...
...
@@ -28,7 +28,6 @@ integration-test-py3: build-py3
docker run
-v
`
$(HOST_TMPDIR)
`
:/tmp
-v
/var/run/docker.sock:/var/run/docker.sock docker-py3 py.test
-rxs
tests/integration_test.py
integration-dind
:
build build-py3
docker build
-t
dpy-tests
-f
./tests/Dockerfile .
docker run
-d
--name
dpy-dind
-v
/tmp
--privileged
dockerswarm/dind:1.8.1 docker
-d
-H
tcp://0.0.0.0:2375
docker run
--volumes-from
dpy-dind
--env
=
"DOCKER_HOST=tcp://docker:2375"
--link
=
dpy-dind:docker docker-py py.test
-rxs
tests/integration_test.py
docker run
--volumes-from
dpy-dind
--env
=
"DOCKER_HOST=tcp://docker:2375"
--link
=
dpy-dind:docker docker-py3 py.test
-rxs
tests/integration_test.py
...
...
tests/integration_test.py
Dosyayı görüntüle @
1fb2db49
...
...
@@ -82,7 +82,7 @@ class BaseTestCase(unittest.TestCase):
if
six
.
PY2
:
self
.
assertRegex
=
self
.
assertRegexpMatches
self
.
assertCountEqual
=
self
.
assertItemsEqual
self
.
client
=
docker_client
(
timeout
=
5
)
self
.
client
=
docker_client
(
timeout
=
60
)
self
.
tmp_imgs
=
[]
self
.
tmp_containers
=
[]
self
.
tmp_folders
=
[]
...
...
@@ -1115,38 +1115,34 @@ class TestRemoveLink(BaseTestCase):
class
TestPull
(
BaseTestCase
):
def
runTest
(
self
):
self
.
client
.
close
()
self
.
client
=
docker_client
(
timeout
=
10
)
try
:
self
.
client
.
remove_image
(
'
busybox
'
)
self
.
client
.
remove_image
(
'
hello-world
'
)
except
docker
.
errors
.
APIError
:
pass
res
=
self
.
client
.
pull
(
'
busybox
'
)
res
=
self
.
client
.
pull
(
'
hello-world
'
)
self
.
assertEqual
(
type
(
res
),
six
.
text_type
)
self
.
assertGreaterEqual
(
len
(
self
.
client
.
images
(
'
busybox
'
)),
1
len
(
self
.
client
.
images
(
'
hello-world
'
)),
1
)
img_info
=
self
.
client
.
inspect_image
(
'
busybox
'
)
img_info
=
self
.
client
.
inspect_image
(
'
hello-world
'
)
self
.
assertIn
(
'Id'
,
img_info
)
class
TestPullStream
(
BaseTestCase
):
def
runTest
(
self
):
self
.
client
.
close
()
self
.
client
=
docker_client
(
timeout
=
10
)
try
:
self
.
client
.
remove_image
(
'
busybox
'
)
self
.
client
.
remove_image
(
'
hello-world
'
)
except
docker
.
errors
.
APIError
:
pass
stream
=
self
.
client
.
pull
(
'
busybox
'
,
stream
=
True
)
stream
=
self
.
client
.
pull
(
'
hello-world
'
,
stream
=
True
)
for
chunk
in
stream
:
if
six
.
PY3
:
chunk
=
chunk
.
decode
(
'utf-8'
)
json
.
loads
(
chunk
)
# ensure chunk is a single, valid JSON blob
self
.
assertGreaterEqual
(
len
(
self
.
client
.
images
(
'
busybox
'
)),
1
len
(
self
.
client
.
images
(
'
hello-world
'
)),
1
)
img_info
=
self
.
client
.
inspect_image
(
'
busybox
'
)
img_info
=
self
.
client
.
inspect_image
(
'
hello-world
'
)
self
.
assertIn
(
'Id'
,
img_info
)
...
...
@@ -1195,9 +1191,7 @@ class TestRemoveImage(BaseTestCase):
class
ImportTestCase
(
BaseTestCase
):
'''Base class for `docker import` test cases.'''
# Use a large file size to increase the chance of triggering any
# MemoryError exceptions we might hit.
TAR_SIZE
=
512
*
1024
*
1024
TAR_SIZE
=
512
*
1024
def
write_dummy_tar_content
(
self
,
n_bytes
,
tar_fd
):
def
extend_file
(
f
,
n_bytes
):
...
...
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