Merge "remove nova-cert from most functional tests"
This commit is contained in:
commit
c5c99fe968
@ -2,13 +2,6 @@
|
||||
"availabilityZoneInfo": [
|
||||
{
|
||||
"hosts": {
|
||||
"cert": {
|
||||
"nova-cert": {
|
||||
"active": true,
|
||||
"available": true,
|
||||
"updated_at": null
|
||||
}
|
||||
},
|
||||
"conductor": {
|
||||
"nova-conductor": {
|
||||
"active": true,
|
||||
|
@ -10,11 +10,6 @@
|
||||
"service": "compute",
|
||||
"zone": "nova"
|
||||
},
|
||||
{
|
||||
"host_name": "a942ebfa00064d9d89a9e5a175cb9ba8",
|
||||
"service": "cert",
|
||||
"zone": "internal"
|
||||
},
|
||||
{
|
||||
"host_name": "e73ec0bd35c64de4a1adfa8b8969a1f6",
|
||||
"service": "consoleauth",
|
||||
|
@ -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,
|
||||
|
@ -10,11 +10,6 @@
|
||||
"service": "compute",
|
||||
"zone": "nova"
|
||||
},
|
||||
{
|
||||
"host_name": "%(host_name)s",
|
||||
"service": "cert",
|
||||
"zone": "internal"
|
||||
},
|
||||
{
|
||||
"host_name": "%(host_name)s",
|
||||
"service": "consoleauth",
|
||||
|
@ -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', {})
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user