コード例 #1
0
 def test_conditional_neutron_migration_juno(self):
     self.os_release.return_value = 'icehouse'
     hooks.conditional_neutron_migration()
     self.log.assert_called_with(
         'Not running neutron database migration as migrations are handled'
         ' by the neutron-server process.'
     )
コード例 #2
0
 def test_conditional_neutron_migration_kilo(self):
     self.os_release.return_value = 'kilo'
     self.relation_ids.return_value = []
     hooks.conditional_neutron_migration()
     self.log.assert_called_with(
         'Not running neutron database migration as migrations are by the '
         'neutron-api charm.')
コード例 #3
0
 def test_conditional_neutron_migration_kilo(self):
     self.os_release.return_value = 'kilo'
     self.relation_ids.return_value = []
     hooks.conditional_neutron_migration()
     self.log.assert_called_with(
         'Not running neutron database migration as migrations are by the '
         'neutron-api charm.'
     )
コード例 #4
0
 def test_conditional_neutron_migration(self):
     self.os_release.return_value = 'juno'
     self.services.return_value = ['neutron-server']
     hooks.conditional_neutron_migration()
     self.migrate_neutron_database.assert_called_with()
     self.service_restart.assert_called_with('neutron-server')
コード例 #5
0
 def test_conditional_neutron_migration_juno(self):
     self.os_release.return_value = 'icehouse'
     hooks.conditional_neutron_migration()
     self.log.assert_called_with(
         'Not running neutron database migration as migrations are handled'
         ' by the neutron-server process.')
コード例 #6
0
 def test_conditional_neutron_migration(self):
     self.os_release.return_value = 'juno'
     self.services.return_value = ['neutron-server']
     hooks.conditional_neutron_migration()
     self.migrate_neutron_database.assert_called_with()
     self.service_restart.assert_called_with('neutron-server')