def test_config_changed_with_openstack_upgrade_action( self, mock_configure_https): self.openstack_upgrade_available.return_value = True self.test_config.set('action-managed-upgrade', True) relations.config_changed() self.assertFalse(self.do_openstack_upgrade.called)
def openstack_upgrade(): """Perform action-managed OpenStack upgrade. Upgrades packages to the configured openstack-origin version and sets the corresponding action status as a result. If the charm was installed from source we cannot upgrade it. For backwards compatibility a config flag (action-managed-upgrade) must be set for this code to run, otherwise a full service level upgrade will fire on config-changed.""" if (do_action_openstack_upgrade('heat-common', do_openstack_upgrade, CONFIGS)): config_changed()
def test_config_changed_with_upgrade(self, mock_configure_https): self.openstack_upgrade_available.return_value = True relations.config_changed() self.assertTrue(self.do_openstack_upgrade.called)
def test_config_changed_no_upgrade(self, mock_configure_https): self.openstack_upgrade_available.return_value = False relations.config_changed()