summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2015-02-10 16:09:48 -0800
committerJoffrey F <joffrey@docker.com>2015-02-10 16:13:09 -0800
commite379e8ae241faf0d8fc244cf4f7228e615149c8b (patch)
tree122e6205712051447a0d2b43b0aa1a1c632be45d /tests
parentd0512028be0301325a59bc94831743e628e3108e (diff)
downloaddocker-py-e379e8ae241faf0d8fc244cf4f7228e615149c8b.tar.gz
read_only parameterread_only_rootfs
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_test.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/integration_test.py b/tests/integration_test.py
index 46b630e..edee039 100644
--- a/tests/integration_test.py
+++ b/tests/integration_test.py
@@ -312,6 +312,33 @@ class TestStartContainerWithRoBinds(BaseTestCase):
self.assertFalse(inspect_data['VolumesRW'][mount_dest])
+class TestCreateContainerReadOnlyFs(BaseTestCase):
+ def runTest(self):
+ ctnr = self.client.create_container(
+ 'busybox', ['mkdir', '/shrine'],
+ host_config=create_host_config(read_only=True)
+ )
+ self.assertIn('Id', ctnr)
+ self.tmp_containers.append(ctnr['Id'])
+ self.client.start(ctnr)
+ res = self.client.wait(ctnr)
+ self.assertNotEqual(res, 0)
+
+
+class TestStartContainerReadOnlyFs(BaseTestCase):
+ def runTest(self):
+ # Presumably a bug in 1.5.0
+ # https://github.com/docker/docker/issues/10695
+ ctnr = self.client.create_container(
+ 'busybox', ['mkdir', '/shrine'],
+ )
+ self.assertIn('Id', ctnr)
+ self.tmp_containers.append(ctnr['Id'])
+ self.client.start(ctnr, read_only=True)
+ # res = self.client.wait(ctnr)
+ # self.assertNotEqual(res, 0)
+
+
class TestCreateContainerWithName(BaseTestCase):
def runTest(self):
res = self.client.create_container('busybox', 'true', name='foobar')