From: Alfredo Deza Date: Tue, 18 Sep 2018 18:07:06 +0000 (-0400) Subject: ceph-volume tests.lvm verify that it is reported when --journal is not used with... X-Git-Tag: v12.2.9~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0744da952edbdbcaa0a127ec2fdf6d86a09c7701;p=ceph.git ceph-volume tests.lvm verify that it is reported when --journal is not used with --filestore Signed-off-by: Alfredo Deza (cherry picked from commit ae657d2fe012b0e78959ead9d8d3baa1095a31ff) --- diff --git a/src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py b/src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py index bc2486cf6944..ab0115e959ba 100644 --- a/src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py +++ b/src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py @@ -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):