def test_install_hook_precise_distro(self): self.test_config.set('openstack-origin', 'distro') self.lsb_release.return_value = {'DISTRIB_CODENAME': 'precise'} self.service_stop.return_value = True relations.install_hook() self.configure_installation_source.assert_called_with( "cloud:precise-folsom" )
def test_install_hook_precise_distro(self): self.test_config.set('openstack-origin', 'distro') self.lsb_release.return_value = {'DISTRIB_RELEASE': 12.04, 'DISTRIB_CODENAME': 'precise'} self.service_stop.return_value = True relations.install_hook() self.configure_installation_source.assert_called_with( "cloud:precise-folsom" )
def test_install_hook(self): repo = 'cloud:precise-grizzly' _packages = ['apache2', 'glance', 'haproxy', 'memcached', 'python-keystone', 'python-mysqldb', 'python-psycopg2', 'python-six', 'python-swiftclient', 'uuid'] self.test_config.set('openstack-origin', repo) self.service_stop.return_value = True self.determine_packages.return_value = _packages relations.install_hook() self.configure_installation_source.assert_called_with(repo) self.apt_update.assert_called_with(fatal=True) self.apt_install.assert_called_with(_packages, fatal=True) self.assertTrue(self.execd_preinstall.called)
def test_install_hook(self): repo = 'cloud:precise-grizzly' self.test_config.set('openstack-origin', repo) self.service_stop.return_value = True relations.install_hook() self.configure_installation_source.assert_called_with(repo) self.assertTrue(self.apt_update.called) self.apt_install.assert_called_with(['apache2', 'glance', 'python-mysqldb', 'python-swift', 'python-keystone', 'uuid', 'haproxy']) self.assertTrue(self.execd_preinstall.called)