mirror of https://github.com/ceph/ceph-ansible.git
tests: update ceph_volume tests
accordingly to change introduced by b5548ea9412cd7741bee993dddcbfd9daa34cb02
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f2dcb02d21
)
pull/3657/head
parent
58a527c192
commit
320af524d8
|
@ -182,14 +182,7 @@ def container_exec(binary, container_image):
|
|||
'''
|
||||
Build the docker CLI to run a command inside a container
|
||||
'''
|
||||
<<<<<<< HEAD
|
||||
|
||||
command_exec = ['docker', 'run', '--rm', '--privileged', '--net=host',
|
||||
=======
|
||||
container_binary = os.getenv('CEPH_CONTAINER_BINARY')
|
||||
command_exec = [container_binary, 'run',
|
||||
'--rm', '--privileged', '--net=host', '--ipc=host',
|
||||
>>>>>>> 15812970... cv: expose host ipc namespace to ceph-volume container
|
||||
command_exec = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host',
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z',
|
||||
|
|
|
@ -39,7 +39,7 @@ class TestCephVolumeModule(object):
|
|||
def test_container_exec(sefl):
|
||||
fake_binary = "ceph-volume"
|
||||
fake_container_image = "docker.io/ceph/daemon:latest-luminous"
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', # noqa E501
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host', # noqa E501
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', # noqa E501
|
||||
|
@ -55,7 +55,7 @@ class TestCephVolumeModule(object):
|
|||
fake_module = MagicMock()
|
||||
fake_module.params = {'data': '/dev/sda'}
|
||||
fake_container_image = "docker.io/ceph/daemon:latest-luminous"
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', # noqa E501
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host', # noqa E501
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', # noqa E501
|
||||
|
@ -123,7 +123,7 @@ class TestCephVolumeModule(object):
|
|||
fake_module = MagicMock()
|
||||
fake_module.params = {'cluster': 'ceph', 'data': '/dev/sda'}
|
||||
fake_container_image = "docker.io/ceph/daemon:latest-luminous"
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', # noqa E501
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host', # noqa E501
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', # noqa E501
|
||||
|
@ -150,7 +150,7 @@ class TestCephVolumeModule(object):
|
|||
|
||||
fake_action = "create"
|
||||
fake_container_image = "docker.io/ceph/daemon:latest-luminous"
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', # noqa E501
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host', # noqa E501
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', # noqa E501
|
||||
|
@ -198,7 +198,7 @@ class TestCephVolumeModule(object):
|
|||
|
||||
fake_action = "prepare"
|
||||
fake_container_image = "docker.io/ceph/daemon:latest-luminous"
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', # noqa E501
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host', # noqa E501
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', # noqa E501
|
||||
|
@ -247,7 +247,7 @@ class TestCephVolumeModule(object):
|
|||
'batch_devices': ["/dev/sda", "/dev/sdb"]}
|
||||
|
||||
fake_container_image = "docker.io/ceph/daemon:latest-luminous"
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', # noqa E501
|
||||
expected_command_list = ['docker', 'run', '--rm', '--privileged', '--net=host', '--ipc=host', # noqa E501
|
||||
'-v', '/run/lock/lvm:/run/lock/lvm:z',
|
||||
'-v', '/var/run/udev/:/var/run/udev/:z',
|
||||
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', # noqa E501
|
||||
|
|
Loading…
Reference in New Issue