Merge "Fix gate-cinder-tox-db-functional job"

This commit is contained in:
Jenkins 2016-05-05 17:22:19 +00:00 committed by Gerrit Code Review
commit f5a558416e
2 changed files with 5 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import requests
from six.moves import urllib
from cinder.i18n import _
from cinder.tests.unit import fake_constants as fake
class OpenStackApiException(Exception):
@ -72,7 +73,7 @@ class TestOpenStackClient(object):
self.auth_key = auth_key
self.auth_uri = auth_uri
# default project_id
self.project_id = 'openstack'
self.project_id = fake.PROJECT_ID
def request(self, url, method='GET', body=None, headers=None,
ssl_verify=True, stream=False):

View File

@ -28,6 +28,7 @@ from oslo_config import cfg
from cinder import service
from cinder import test # For the flags
from cinder.tests.functional.api import client
from cinder.tests.unit import fake_constants as fake
CONF = cfg.CONF
@ -76,7 +77,8 @@ class _FunctionalTestBase(test.TestCase):
self._start_api_service()
self.addCleanup(self.osapi.stop)
self.api = client.TestOpenStackClient('fake', 'fake', self.auth_url)
self.api = client.TestOpenStackClient(fake.USER_ID,
fake.PROJECT_ID, self.auth_url)
def _start_api_service(self):
default_conf = os.path.abspath(os.path.join(