remove novaclient, fix python syntax
Change-Id: Ib5c523a5feb74fbc6f4f75ec4d112dbcd23a559c
This commit is contained in:
parent
9dadf01624
commit
fabad5a660
|
@ -136,8 +136,7 @@ class KeystoneClientTests(object):
|
||||||
# FIXME(dolph): this should raise unauthorized
|
# FIXME(dolph): this should raise unauthorized
|
||||||
# from keystoneclient import exceptions as client_exceptions
|
# from keystoneclient import exceptions as client_exceptions
|
||||||
# with self.assertRaises(client_exceptions.Unauthorized):
|
# with self.assertRaises(client_exceptions.Unauthorized):
|
||||||
with self.assertRaises(Exception):
|
self.assertRaises(Exception, token_client.tenants.list)
|
||||||
token_client.tenants.list()
|
|
||||||
|
|
||||||
# TODO(termie): I'm not really sure that this is testing much
|
# TODO(termie): I'm not really sure that this is testing much
|
||||||
def test_endpoints(self):
|
def test_endpoints(self):
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
import copy
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from keystone import config
|
|
||||||
from keystone import test
|
|
||||||
from keystone.common import logging
|
|
||||||
from keystone.common import utils
|
|
||||||
|
|
||||||
import default_fixtures
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
|
||||||
OPENSTACK_REPO = 'https://review.openstack.org/p/openstack'
|
|
||||||
NOVACLIENT_REPO = '%s/python-novaclient.git' % OPENSTACK_REPO
|
|
||||||
|
|
||||||
|
|
||||||
class CompatTestCase(test.TestCase):
|
|
||||||
def setUp(self):
|
|
||||||
super(CompatTestCase, self).setUp()
|
|
||||||
|
|
||||||
|
|
||||||
class NovaClientCompatMasterTestCase(CompatTestCase):
|
|
||||||
def setUp(self):
|
|
||||||
super(NovaClientCompatMasterTestCase, self).setUp()
|
|
||||||
|
|
||||||
revdir = test.checkout_vendor(NOVACLIENT_REPO, 'master')
|
|
||||||
self.add_path(revdir)
|
|
||||||
from novaclient.keystone import client as ks_client
|
|
||||||
from novaclient import client as base_client
|
|
||||||
reload(ks_client)
|
|
||||||
reload(base_client)
|
|
||||||
|
|
||||||
CONF(config_files=[test.etcdir('keystone.conf'),
|
|
||||||
test.testsdir('test_overrides.conf')])
|
|
||||||
self.app = self.loadapp('keystone')
|
|
||||||
self.load_backends()
|
|
||||||
self.load_fixtures(default_fixtures)
|
|
||||||
self.server = self.serveapp('keystone')
|
|
||||||
|
|
||||||
def test_authenticate_and_tenants(self):
|
|
||||||
from novaclient.keystone import client as ks_client
|
|
||||||
from novaclient import client as base_client
|
|
||||||
|
|
||||||
port = self.server.socket_info['socket'][1]
|
|
||||||
CONF.public_port = port
|
|
||||||
|
|
||||||
# NOTE(termie): novaclient wants a "/" TypeErrorat the end, keystoneclient does not
|
|
||||||
# NOTE(termie): projectid is apparently sent as tenantName, so... that's
|
|
||||||
# unfortunate.
|
|
||||||
# NOTE(termie): novaclient seems to care about the region more than
|
|
||||||
# keystoneclient
|
|
||||||
conn = base_client.HTTPClient(auth_url="http://localhost:%s/v2.0/" % port,
|
|
||||||
user='FOO',
|
|
||||||
password='foo2',
|
|
||||||
projectid='BAR',
|
|
||||||
region_name='RegionOne')
|
|
||||||
client = ks_client.Client(conn)
|
|
||||||
client.authenticate()
|
|
||||||
# NOTE(termie): novaclient doesn't know about tenants or anything like that
|
|
||||||
# so just test that we can validate
|
|
Loading…
Reference in New Issue