From: Alfredo Deza Date: Tue, 31 Jul 2018 20:47:05 +0000 (-0400) Subject: ceph-volume tests verify that luminous doesn't use stdin X-Git-Tag: v14.0.1~710^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a97a63540290c93e05857ac175f3c9c45a4602c6;p=ceph.git ceph-volume tests verify that luminous doesn't use stdin Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/tests/util/test_prepare.py b/src/ceph-volume/ceph_volume/tests/util/test_prepare.py index 8148a7f2d18f4..4b3728f5c34be 100644 --- a/src/ceph-volume/ceph_volume/tests/util/test_prepare.py +++ b/src/ceph-volume/ceph_volume/tests/util/test_prepare.py @@ -149,6 +149,12 @@ class TestOsdMkfsFilestore(object): prepare.osd_mkfs_filestore(1, 'asdf', keyring='secret') assert flag in fake_call.calls[0]['args'][0] + def test_keyring_is_used_luminous(self, fake_call, monkeypatch): + monkeypatch.setattr(prepare, '__release__', 'luminous') + monkeypatch.setattr(system, 'chown', lambda path: True) + prepare.osd_mkfs_filestore(1, 'asdf', keyring='secret') + assert '--keyfile' not in fake_call.calls[0]['args'][0] + class TestOsdMkfsBluestore(object): @@ -162,6 +168,12 @@ class TestOsdMkfsBluestore(object): prepare.osd_mkfs_bluestore(1, 'asdf') assert '--keyfile' not in fake_call.calls[0]['args'][0] + def test_keyring_is_not_added_luminous(self, fake_call, monkeypatch): + monkeypatch.setattr(system, 'chown', lambda path: True) + prepare.osd_mkfs_bluestore(1, 'asdf') + monkeypatch.setattr(prepare, '__release__', 'luminous') + assert '--keyfile' not in fake_call.calls[0]['args'][0] + def test_wal_is_added(self, fake_call, monkeypatch): monkeypatch.setattr(system, 'chown', lambda path: True) prepare.osd_mkfs_bluestore(1, 'asdf', wal='/dev/smm1')