Add newline at end of file when writing keyring
Change-Id: If79977c2ec7588b09ca2e118141c7f3d9cf61767 Closes-Bug: #1864706
This commit is contained in:
parent
c5a7e8f1c8
commit
6a00cf92e1
|
@ -1372,6 +1372,8 @@ def create_keyrings():
|
|||
if not output:
|
||||
# NOTE: key not yet created, raise exception and retry
|
||||
raise Exception
|
||||
# NOTE: octopus wants newline at end of file LP: #1864706
|
||||
output += '\n'
|
||||
write_file(_client_admin_keyring, output,
|
||||
owner=ceph_user(), group=ceph_user(),
|
||||
perms=0o400)
|
||||
|
|
|
@ -833,7 +833,7 @@ class CephTestCase(unittest.TestCase):
|
|||
])
|
||||
mock_write_file.assert_called_with(
|
||||
'/etc/ceph/ceph.client.admin.keyring',
|
||||
'testkey', group='ceph', owner='ceph',
|
||||
'testkey\n', group='ceph', owner='ceph',
|
||||
perms=0o400
|
||||
)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue