Write policy.json on leader-settings-changed
Commit 855c954c30 revealed a bug
that occurrs some times when having multpile Keystone units.
Change-Id: I7bfce6db6b0dba855af32aef4c3f496f03a5a34b
Related-Bug: #1637453
This commit is contained in:
@@ -480,6 +480,9 @@ def leader_settings_changed():
|
||||
# sure only the leader is running the cron job.
|
||||
CONFIGS.write(TOKEN_FLUSH_CRON_FILE)
|
||||
|
||||
# Make sure we keep domain and/or project ids used in templates up to date
|
||||
CONFIGS.write(POLICY_JSON)
|
||||
|
||||
update_all_identity_relation_units()
|
||||
|
||||
|
||||
|
||||
@@ -455,7 +455,11 @@ class KeystoneRelationTests(CharmTestCase):
|
||||
self.relation_ids.return_value = ['identity:1']
|
||||
self.related_units.return_value = ['keystone/1']
|
||||
hooks.leader_settings_changed()
|
||||
mock_write.assert_has_calls([call(utils.TOKEN_FLUSH_CRON_FILE)])
|
||||
mock_write.assert_has_calls(
|
||||
[
|
||||
call(utils.TOKEN_FLUSH_CRON_FILE),
|
||||
call(utils.POLICY_JSON),
|
||||
])
|
||||
self.assertTrue(update.called)
|
||||
|
||||
def test_ha_joined(self):
|
||||
|
||||
Reference in New Issue
Block a user