]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
test_build_key_path_bootstrap_osd: fix
authorSébastien Han <seb@redhat.com>
Fri, 16 Nov 2018 09:41:12 +0000 (10:41 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 27 Nov 2018 16:47:40 +0000 (16:47 +0000)
The entity name is client.bootstrap-osd (as returned by Ceph), and not
bootstrap-osd. The build_key_path function split 'client.bootstrap-osd'
on the '.' so using bootstrap-osd fails with index out of range.

Signed-off-by: Sébastien Han <seb@redhat.com>
library/test_ceph_key.py

index 143b6c8f3e3a64e13067f8a1eecd48772f7c0a44..e0b747941ddc8cafaa53406446c5e244c094a13b 100644 (file)
@@ -540,7 +540,7 @@ class TestCephKeyModule(object):
 
     def test_build_key_path_bootstrap_osd(self):
         fake_cluster = "fake"
-        entity = "bootstrap-osd"
+        entity = "client.bootstrap-osd"
         expected_result = "/var/lib/ceph/bootstrap-osd/fake.keyring"
         result = ceph_key.build_key_path(fake_cluster, entity)
         assert result == expected_result