mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
ceph-volume tests.util verify ValidDevice validator
Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
parent
57f76e36ab
commit
649903bdab
@ -96,3 +96,17 @@ class TestExcludeGroupOptions(object):
|
||||
)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert 'Cannot use --filestore (filestore) with --bluestore (bluestore)' in stdout
|
||||
|
||||
|
||||
class TestValidDevice(object):
|
||||
|
||||
def setup(self):
|
||||
self.validator = arg_validators.ValidDevice()
|
||||
|
||||
def test_path_is_valid(self, fake_call):
|
||||
result = self.validator('/')
|
||||
assert result.abspath == '/'
|
||||
|
||||
def test_path_is_invalid(self, fake_call):
|
||||
with pytest.raises(argparse.ArgumentError):
|
||||
self.validator('/device/does/not/exist')
|
||||
|
Loading…
Reference in New Issue
Block a user