}
dgo = DriveGroupSpec.from_json(raw_sample)
- if disk_format == 'filestore':
- with pytest.raises(DriveGroupValidationError):
- dgo.validate()
- else:
- dgo.validate()
return dgo
return make_sample_data
limit=0,
)
- def test_journal_device_prop(self, test_fix):
- test_fix = test_fix(disk_format='filestore')
- assert test_fix.journal_devices == DeviceSelection(
- size=':20G'
- )
-
def test_wal_device_prop_empty(self, test_fix):
test_fix = test_fix(empty=True)
assert test_fix.wal_devices is None
- def test_filestore_format_prop(self, test_fix):
- test_fix = test_fix(disk_format='filestore')
- assert test_fix.objectstore == 'filestore'
-
def test_bluestore_format_prop(self, test_fix):
test_fix = test_fix(disk_format='bluestore')
assert test_fix.objectstore == 'bluestore'
test_fix = test_fix(empty=True)
assert test_fix.objectstore == 'bluestore'
- def test_journal_size(self, test_fix):
- test_fix = test_fix(disk_format='filestore')
- assert test_fix.journal_size == '5G'
-
def test_osds_per_device(self, test_fix):
test_fix = test_fix(osds_per_device='3')
assert test_fix.osds_per_device == '3'