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
abaf346b
Kaydet (Commit)
abaf346b
authored
Eyl 09, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make running integration tests with dind possible
üst
2dfab762
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
5 deletions
+34
-5
.dockerignore
.dockerignore
+1
-0
Makefile
Makefile
+4
-0
Dockerfile
tests/Dockerfile
+19
-0
integration_test.py
tests/integration_test.py
+4
-3
utils_test.py
tests/utils_test.py
+6
-2
No files found.
.dockerignore
Dosyayı görüntüle @
abaf346b
...
...
@@ -14,3 +14,4 @@ tests/__pycache__
# Compiled Documentation
site/
Makefile
Makefile
Dosyayı görüntüle @
abaf346b
...
...
@@ -23,3 +23,7 @@ integration-test: build
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-ci
:
docker build
-t
dpy-tests
-f
./tests/Dockerfile .
docker run
--privileged
-t
dpy-tests
tests/Dockerfile
0 → 100644
Dosyayı görüntüle @
abaf346b
FROM
dockerswarm/dind:1.8.1
MAINTAINER
Joffrey F <joffrey@docker.com>
RUN
mkdir
/home/docker-py
WORKDIR
/home/docker-py
RUN
apt-get update
&&
apt-get
install
-y
python python-setuptools
&&
easy_install pip
ADD
requirements.txt /home/docker-py/requirements.txt
RUN
pip
install
-r
requirements.txt
ADD
test-requirements.txt /home/docker-py/test-requirements.txt
RUN
pip
install
-r
test-requirements.txt
ADD
. /home/docker-py
RUN
pip
install
-U
.
CMD
["bash", "-c", "docker daemon 2>/dev/null & py.test -rxs tests/integration_test.py"]
\ No newline at end of file
tests/integration_test.py
Dosyayı görüntüle @
abaf346b
...
...
@@ -190,7 +190,6 @@ class TestCreateContainer(BaseTestCase):
class
TestCreateContainerWithBinds
(
BaseTestCase
):
@pytest.mark.skipif
(
True
,
reason
=
"Doesn't work inside a container - FIXME"
)
def
runTest
(
self
):
mount_dest
=
'/mnt'
mount_origin
=
tempfile
.
mkdtemp
()
...
...
@@ -233,7 +232,6 @@ class TestCreateContainerWithBinds(BaseTestCase):
class
TestCreateContainerWithRoBinds
(
BaseTestCase
):
@pytest.mark.skipif
(
True
,
reason
=
"Doesn't work inside a container - FIXME"
)
def
runTest
(
self
):
mount_dest
=
'/mnt'
mount_origin
=
tempfile
.
mkdtemp
()
...
...
@@ -1461,8 +1459,11 @@ class TestBuildWithDockerignore(Cleanup, BaseTestCase):
self
.
client
.
wait
(
c
)
logs
=
self
.
client
.
logs
(
c
)
if
six
.
PY3
:
logs
=
logs
.
decode
(
'utf-8'
)
self
.
assertEqual
(
filter
(
None
,
logs
.
split
(
'
\n
'
)),
list
(
filter
(
None
,
logs
.
split
(
'
\n
'
)
)),
[
'not-ignored'
],
)
...
...
tests/utils_test.py
Dosyayı görüntüle @
abaf346b
...
...
@@ -234,14 +234,18 @@ class UtilsTest(base.BaseTestCase):
def
test_create_host_config_dict_logconfig
(
self
):
dct
=
{
'type'
:
LogConfig
.
types
.
SYSLOG
,
'config'
:
{
'key1'
:
'val1'
}}
config
=
create_host_config
(
log_config
=
dct
)
config
=
create_host_config
(
version
=
DEFAULT_DOCKER_API_VERSION
,
log_config
=
dct
)
self
.
assertIn
(
'LogConfig'
,
config
)
self
.
assertTrue
(
isinstance
(
config
[
'LogConfig'
],
LogConfig
))
self
.
assertEqual
(
dct
[
'type'
],
config
[
'LogConfig'
]
.
type
)
def
test_create_host_config_obj_logconfig
(
self
):
obj
=
LogConfig
(
type
=
LogConfig
.
types
.
SYSLOG
,
config
=
{
'key1'
:
'val1'
})
config
=
create_host_config
(
log_config
=
obj
)
config
=
create_host_config
(
version
=
DEFAULT_DOCKER_API_VERSION
,
log_config
=
obj
)
self
.
assertIn
(
'LogConfig'
,
config
)
self
.
assertTrue
(
isinstance
(
config
[
'LogConfig'
],
LogConfig
))
self
.
assertEqual
(
obj
,
config
[
'LogConfig'
])
...
...
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