]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests.lvm verify that it is reported when --journal is not used with... 24150/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 18 Sep 2018 18:07:06 +0000 (14:07 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 18 Sep 2018 18:08:38 +0000 (14:08 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py

index bc2486cf6944fbd795383b3ecd18b1b100da5358..ab0115e959baf7663e9cc5abdfc1b7ea6d983579 100644 (file)
@@ -74,6 +74,13 @@ class TestPrepare(object):
         expected = 'Cannot use --block.db (bluestore) with --journal (filestore)'
         assert expected in stdout
 
+    def test_journal_is_required_with_filestore(self, is_root, monkeypatch):
+        monkeypatch.setattr('os.path.exists', lambda x: True)
+        with pytest.raises(SystemExit) as error:
+            lvm.prepare.Prepare(argv=['--filestore', '--data', '/dev/sdfoo']).main()
+        expected = '--journal is required when using --filestore'
+        assert expected in str(error)
+
 
 class TestGetJournalLV(object):