Move test_ipa_integration to functional tests directory
Since novajoin integrates Nova with FreeIPA, functional tests won't be able to run without FreeIPA. Therefore, we want to run integration tests together with functional tests. Change-Id: I93a3ef03b8bf2141710602fd8ba5f01098767fe3
This commit is contained in:
parent
73a47b6652
commit
2ffc08c544
|
@ -1,7 +0,0 @@
|
|||
Currently this test needs to be executed against a live installation with a copy
|
||||
of the novajoin keytab in /tmp/test.keytab.
|
||||
|
||||
A new krb5.conf is included which will force the default ticket lifetime to 1 minute
|
||||
and time.sleep(60) is used to ensure an expiration will happen.
|
||||
|
||||
I execute it as: nosetests -v novajoin/tests/integration/test_ipa.py
|
|
@ -0,0 +1,10 @@
|
|||
The test_ipa_integration.py test needs to be executed against a live
|
||||
installation of FreeIPA. It will look for a copy of the novajoin keytab in
|
||||
/etc/novajoin/krb5.keytab or /tmp/test.keytab.
|
||||
|
||||
A new krb5.conf is included which will force the default ticket lifetime to
|
||||
1 minute and time.sleep(60) is used to ensure an expiration will happen.
|
||||
|
||||
To run only the FreeIPA integration test, execute it as:
|
||||
|
||||
python -m unittest novajoin.tests.functional.test_ipa_integration
|
|
@ -54,6 +54,8 @@ class TestIPAService(testtools.TestCase):
|
|||
def setUp(self):
|
||||
global hostname
|
||||
CONF.keytab = '/tmp/test.keytab'
|
||||
if not os.path.isfile(CONF.keytab):
|
||||
CONF.keytab = '/etc/novajoin/krb5.keytab'
|
||||
super(TestIPAService, self).setUp()
|
||||
self.ipaclient = IPAClient()
|
||||
|
||||
|
@ -66,7 +68,8 @@ class TestIPAService(testtools.TestCase):
|
|||
|
||||
if hostname is None:
|
||||
hostname = six.text_type(str(uuid.uuid4()) + '.' + api.env.domain)
|
||||
os.environ['KRB5_CONFIG'] = 'krb5.conf'
|
||||
os.environ['KRB5_CONFIG'] = os.path.join(
|
||||
os.path.dirname(__file__), 'krb5.conf')
|
||||
|
||||
def test_host_add(self):
|
||||
global hostname
|
Loading…
Reference in New Issue