Browse Source

Fix issues with tests

Some fixes were needed to make sure the ipa client code was
accessing the right config parameters for connect_retries and
keytab.

Also, more attributes needed to be added to the flavors to make
the enrollment tests successful.  This prevents nova returning
No Valid Host available errors.

Change-Id: I018a2dd8f3de9598e19394ea2b3f0a0bfdf4c669
changes/72/680472/1
Ade Lee 9 months ago
parent
commit
67b6aa37a8
3 changed files with 15 additions and 12 deletions
  1. +3
    -0
      novajoin_tempest_plugin/config.py
  2. +2
    -9
      novajoin_tempest_plugin/ipa/ipa_client.py
  3. +10
    -3
      novajoin_tempest_plugin/tests/scenario/test_novajoin_enrollment.py

+ 3
- 0
novajoin_tempest_plugin/config.py View File

@@ -27,6 +27,9 @@ novajoin_group = cfg.OptGroup(
title="Novajoin test plugin settings")

NovajoinGroup = [
cfg.IntOpt('connect_retries',
default=1,
help='Number of connection attempts to IPA'),
cfg.StrOpt('flavor_tag',
default='vm',
help='Flavor tag to use in novajoin enrollment tests'),


+ 2
- 9
novajoin_tempest_plugin/ipa/ipa_client.py View File

@@ -40,18 +40,11 @@ LOG = logging.getLogger(__name__)
class IPABase(object):

def __init__(self, backoff=0):
try:
self.ntries = CONF.connect_retries
except cfg.NoSuchOptError:
self.ntries = 1
if not ipalib_imported:
return

try:
self.keytab = CONF.keytab
except cfg.NoSuchOptError:
self.keytab = '/etc/novajoin/krb5.keytab'

self.ntries = CONF.novajoin.connect_retries
self.keytab = CONF.novajoin.keytab
with open(self.keytab):
pass # Throw a nicer exception if krb5.keytab does not exist



+ 10
- 3
novajoin_tempest_plugin/tests/scenario/test_novajoin_enrollment.py View File

@@ -29,17 +29,24 @@ NETWORK = 'ctlplane'
FLAVORS = {
'baremetal': {'ram': 4096,
'vcpus': 3,
'disk': 30,
'disk': 38,
'specs': {
"capabilities:boot_option": "local",
"cpu_arch": "x86_64",
"capabilities:profile": "ironic",
"resources:CUSTOM_IRONIC": '1'}},
"resources:CUSTOM_IRONIC": '1',
"resources:DISK_GB": '0',
"resources:MEMORY_MB": '0',
"resources:VCPU": '0'}},
'vm': {'ram': 4096,
'vcpus': 1,
'disk': 40,
'specs': {
"capabilities:boot_option": "local",
"capabilities:profile": "compute"}}
"capabilities:profile": "compute",
"resources:DISK_GB": '0',
"resources:MEMORY_MB": '0',
"resources:VCPU": '0'}}
}




Loading…
Cancel
Save