687
687
self.assertEquals(self.ml2_migration.call_count, 0)
688
688
self.assertTrue(migrate_nova_database.call_count, 1)
690
@patch.object(utils, 'get_step_upgrade_source')
691
@patch.object(utils, 'migrate_nova_database')
692
@patch.object(utils, 'determine_packages')
693
def test_upgrade_juno_kilo(self, determine_packages,
694
migrate_nova_database,
695
get_step_upgrade_source):
696
"Simulate a call to do_openstack_upgrade() for juno->kilo"
697
self.test_config.set('openstack-origin', 'cloud:trusty-kilo')
698
get_step_upgrade_source.return_value = None
699
self.os_release.return_value = 'juno'
700
self.get_os_codename_install_source.return_value = 'kilo'
701
self.eligible_leader.return_value = True
702
self.relation_ids.return_value = []
703
utils.do_openstack_upgrade()
704
self.assertEquals(self.neutron_db_manage.call_count, 0)
705
self.apt_update.assert_called_with(fatal=True)
706
self.apt_upgrade.assert_called_with(options=DPKG_OPTS, fatal=True,
708
self.apt_install.assert_called_with(determine_packages(), fatal=True)
709
self.register_configs.assert_called_with(release='kilo')
710
self.assertEquals(self.ml2_migration.call_count, 0)
711
self.assertTrue(migrate_nova_database.call_count, 1)
690
713
@patch.object(utils, '_do_openstack_upgrade')
691
714
def test_upgrade_grizzly_icehouse_source(self, _do_openstack_upgrade):
692
715
"Verify get_step_upgrade_source() for grizzly->icehouse"