]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests verify that luminous doesn't use stdin 23355/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 31 Jul 2018 20:47:05 +0000 (16:47 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 1 Aug 2018 11:15:37 +0000 (07:15 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/tests/util/test_prepare.py

index 8148a7f2d18f45e11d17b45e0614bee0c8dcdee7..4b3728f5c34be264e9860c62a9639cc58a85c1d6 100644 (file)
@@ -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')