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
e255c10f
Kaydet (Commit)
e255c10f
authored
Şub 27, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ensure integration tests work with LXC exec driver
üst
5ce02b9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
integration_test.py
tests/integration_test.py
+16
-4
No files found.
tests/integration_test.py
Dosyayı görüntüle @
e255c10f
...
...
@@ -32,6 +32,7 @@ from test import Cleanup
# export; history; import_image; insert; port; push; tag; get; load; stats;
DEFAULT_BASE_URL
=
os
.
environ
.
get
(
'DOCKER_HOST'
)
EXEC_DRIVER_IS_NATIVE
=
True
warnings
.
simplefilter
(
'error'
)
create_host_config
=
docker
.
utils
.
create_host_config
...
...
@@ -312,6 +313,7 @@ class TestStartContainerWithRoBinds(BaseTestCase):
self
.
assertFalse
(
inspect_data
[
'VolumesRW'
][
mount_dest
])
@unittest.skipIf
(
not
EXEC_DRIVER_IS_NATIVE
)
class
TestCreateContainerReadOnlyFs
(
BaseTestCase
):
def
runTest
(
self
):
ctnr
=
self
.
client
.
create_container
(
...
...
@@ -325,6 +327,7 @@ class TestCreateContainerReadOnlyFs(BaseTestCase):
self
.
assertNotEqual
(
res
,
0
)
@unittest.skipIf
(
not
EXEC_DRIVER_IS_NATIVE
)
class
TestStartContainerReadOnlyFs
(
BaseTestCase
):
def
runTest
(
self
):
# Presumably a bug in 1.5.0
...
...
@@ -581,7 +584,8 @@ class TestStop(BaseTestCase):
self
.
assertIn
(
'State'
,
container_info
)
state
=
container_info
[
'State'
]
self
.
assertIn
(
'ExitCode'
,
state
)
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
if
EXEC_DRIVER_IS_NATIVE
:
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
self
.
assertIn
(
'Running'
,
state
)
self
.
assertEqual
(
state
[
'Running'
],
False
)
...
...
@@ -598,7 +602,8 @@ class TestStopWithDictInsteadOfId(BaseTestCase):
self
.
assertIn
(
'State'
,
container_info
)
state
=
container_info
[
'State'
]
self
.
assertIn
(
'ExitCode'
,
state
)
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
if
EXEC_DRIVER_IS_NATIVE
:
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
self
.
assertIn
(
'Running'
,
state
)
self
.
assertEqual
(
state
[
'Running'
],
False
)
...
...
@@ -614,7 +619,8 @@ class TestKill(BaseTestCase):
self
.
assertIn
(
'State'
,
container_info
)
state
=
container_info
[
'State'
]
self
.
assertIn
(
'ExitCode'
,
state
)
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
if
EXEC_DRIVER_IS_NATIVE
:
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
self
.
assertIn
(
'Running'
,
state
)
self
.
assertEqual
(
state
[
'Running'
],
False
)
...
...
@@ -630,7 +636,8 @@ class TestKillWithDictInsteadOfId(BaseTestCase):
self
.
assertIn
(
'State'
,
container_info
)
state
=
container_info
[
'State'
]
self
.
assertIn
(
'ExitCode'
,
state
)
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
if
EXEC_DRIVER_IS_NATIVE
:
self
.
assertNotEqual
(
state
[
'ExitCode'
],
0
)
self
.
assertIn
(
'Running'
,
state
)
self
.
assertEqual
(
state
[
'Running'
],
False
)
...
...
@@ -978,6 +985,7 @@ class TestRestartingContainer(BaseTestCase):
self
.
client
.
remove_container
(
id
,
force
=
True
)
@unittest.skipIf
(
not
EXEC_DRIVER_IS_NATIVE
)
class
TestExecuteCommand
(
BaseTestCase
):
def
runTest
(
self
):
container
=
self
.
client
.
create_container
(
'busybox'
,
'cat'
,
...
...
@@ -991,6 +999,7 @@ class TestExecuteCommand(BaseTestCase):
self
.
assertEqual
(
res
,
expected
)
@unittest.skipIf
(
not
EXEC_DRIVER_IS_NATIVE
)
class
TestExecuteCommandString
(
BaseTestCase
):
def
runTest
(
self
):
container
=
self
.
client
.
create_container
(
'busybox'
,
'cat'
,
...
...
@@ -1004,6 +1013,7 @@ class TestExecuteCommandString(BaseTestCase):
self
.
assertEqual
(
res
,
expected
)
@unittest.skipIf
(
not
EXEC_DRIVER_IS_NATIVE
)
class
TestExecuteCommandStreaming
(
BaseTestCase
):
def
runTest
(
self
):
container
=
self
.
client
.
create_container
(
'busybox'
,
'cat'
,
...
...
@@ -1458,5 +1468,7 @@ class TestRegressions(unittest.TestCase):
if
__name__
==
'__main__'
:
c
=
docker
.
Client
(
base_url
=
DEFAULT_BASE_URL
)
c
.
pull
(
'busybox'
)
exec_driver
=
c
.
info
()[
'ExecutionDriver'
]
EXEC_DRIVER_IS_NATIVE
=
exec_driver
.
startswith
(
'native'
)
c
.
close
()
unittest
.
main
()
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