Merge "remove nova-cert from most functional tests"

This commit is contained in:
Jenkins 2015-12-21 09:05:09 +00:00 committed by Gerrit Code Review
commit c5c99fe968
6 changed files with 12 additions and 33 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,9 @@
from oslo_config import cfg from oslo_config import cfg
from nova import crypto
from nova.tests.functional.api_sample_tests import api_sample_base from nova.tests.functional.api_sample_tests import api_sample_base
from nova.tests.unit import fake_crypto
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('osapi_compute_extension', CONF.import_opt('osapi_compute_extension',
@ -32,6 +34,16 @@ class CertificatesSamplesJsonTest(api_sample_base.ApiSampleTestBaseV21):
'nova.api.openstack.compute.contrib.certificates.Certificates') 'nova.api.openstack.compute.contrib.certificates.Certificates')
return f 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): def test_create_certificates(self):
response = self._do_post('os-certificates', response = self._do_post('os-certificates',
'certificate-create-req', {}) 'certificate-create-req', {})

View File

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