remove nova-cert from most functional tests

nova-cert is only needed for 1 API resource (os-certificates) and the
ec2 api. We don't need to run it on all the other functional
tests. Getting rid of a service start / stop on all of them shaves a
little time off each test, and means noise in logs.

Change-Id: I175b8913fe5d19c8b552c60c793565c042c6b874
This commit is contained in:
Sean Dague 2015-12-15 15:26:46 -05:00
parent a1143e184d
commit af55385203
6 changed files with 12 additions and 33 deletions

View File

@ -2,13 +2,6 @@
"availabilityZoneInfo": [
{
"hosts": {
"cert": {
"nova-cert": {
"active": true,
"available": true,
"updated_at": null
}
},
"conductor": {
"nova-conductor": {
"active": true,

View File

@ -10,11 +10,6 @@
"service": "compute",
"zone": "nova"
},
{
"host_name": "a942ebfa00064d9d89a9e5a175cb9ba8",
"service": "cert",
"zone": "internal"
},
{
"host_name": "e73ec0bd35c64de4a1adfa8b8969a1f6",
"service": "consoleauth",

View File

@ -9,13 +9,6 @@
"updated_at": %(strtime_or_none)s
}
},
"cert": {
"nova-cert": {
"active": true,
"available": true,
"updated_at": %(strtime_or_none)s
}
},
"conductor": {
"nova-conductor": {
"active": true,

View File

@ -10,11 +10,6 @@
"service": "compute",
"zone": "nova"
},
{
"host_name": "%(host_name)s",
"service": "cert",
"zone": "internal"
},
{
"host_name": "%(host_name)s",
"service": "consoleauth",

View File

@ -15,7 +15,9 @@
from oslo_config import cfg
from nova import crypto
from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit import fake_crypto
CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension',
@ -32,6 +34,16 @@ class CertificatesSamplesJsonTest(api_sample_base.ApiSampleTestBaseV21):
'nova.api.openstack.compute.contrib.certificates.Certificates')
return f
def setUp(self):
super(CertificatesSamplesJsonTest, self).setUp()
self.stubs.Set(crypto, 'ensure_ca_filesystem',
fake_crypto.ensure_ca_filesystem)
self.stubs.Set(crypto, 'fetch_ca',
fake_crypto.fetch_ca)
self.stubs.Set(crypto, 'generate_x509_cert',
fake_crypto.generate_x509_cert)
self.cert = self.start_service('cert')
def test_create_certificates(self):
response = self._do_post('os-certificates',
'certificate-create-req', {})

View File

@ -24,14 +24,12 @@ import uuid
from oslo_config import cfg
from oslo_log import log as logging
from nova import crypto
import nova.image.glance
from nova import service
from nova import test
from nova.tests import fixtures as nova_fixtures
from nova.tests.functional.api import client
from nova.tests.unit import cast_as_call
from nova.tests.unit import fake_crypto
import nova.tests.unit.image.fake
@ -76,12 +74,6 @@ class _IntegratedTestBase(test.TestCase):
self.flags(verbose=True)
nova.tests.unit.image.fake.stub_out_image_service(self.stubs)
self.stubs.Set(crypto, 'ensure_ca_filesystem',
fake_crypto.ensure_ca_filesystem)
self.stubs.Set(crypto, 'fetch_ca',
fake_crypto.fetch_ca)
self.stubs.Set(crypto, 'generate_x509_cert',
fake_crypto.generate_x509_cert)
self._setup_services()
self.api_fixture = self.useFixture(
@ -110,7 +102,6 @@ class _IntegratedTestBase(test.TestCase):
self.conductor = self.start_service('conductor',
manager=CONF.conductor.manager)
self.compute = self._setup_compute_service()
self.cert = self.start_service('cert')
self.consoleauth = self.start_service('consoleauth')
self.network = self.start_service('network')