From a97a63540290c93e05857ac175f3c9c45a4602c6 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 31 Jul 2018 16:47:05 -0400 Subject: [PATCH] ceph-volume tests verify that luminous doesn't use stdin Signed-off-by: Alfredo Deza --- .../ceph_volume/tests/util/test_prepare.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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') -- 2.39.5