]> git.proxmox.com Git - ceph.git/blob - ceph/src/ceph-volume/ceph_volume/tests/util/test_encryption.py
3d84e55394163dcc66b42ce4147295536d4b5047
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / util / test_encryption.py
1 from ceph_volume.util import encryption
2
3
4 class TestStatus(object):
5
6 def test_skips_unuseful_lines(self, stub_call):
7 out = ['some line here', ' device: /dev/sdc1']
8 stub_call((out, '', 0))
9 assert encryption.status('/dev/sdc1') == {'device': '/dev/sdc1'}
10
11 def test_removes_extra_quotes(self, stub_call):
12 out = ['some line here', ' device: "/dev/sdc1"']
13 stub_call((out, '', 0))
14 assert encryption.status('/dev/sdc1') == {'device': '/dev/sdc1'}
15
16 def test_ignores_bogus_lines(self, stub_call):
17 out = ['some line here', ' ']
18 stub_call((out, '', 0))
19 assert encryption.status('/dev/sdc1') == {}