Skip to content

Commit

Permalink
Merge pull request #1131 from hemanthnakkina/octavia-k8s-tempest-tests
Browse files Browse the repository at this point in the history
Add tempest tests for Octavia k8s
  • Loading branch information
gboutry authored Sep 15, 2023
2 parents 39b09a3 + 9439c8b commit d2df59c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions zaza/openstack/charm_tests/octavia/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import osc_lib.exceptions

import zaza.model
import zaza.openstack.charm_tests.tempest.tests as tempest_tests
import zaza.openstack.charm_tests.test_utils as test_utils
import zaza.openstack.utilities.openstack as openstack_utils

Expand Down Expand Up @@ -527,3 +528,9 @@ def test_create_loadbalancer(self):

# If we get here, it means the tests passed
self.run_resource_cleanup = True


class OctaviaTempestTestK8S(tempest_tests.TempestTestScaleK8SBase):
"""Test octavia k8s scale out and scale back."""

application_name = "octavia"
6 changes: 5 additions & 1 deletion zaza/openstack/charm_tests/tempest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import zaza.model as model
import zaza.utilities.deployment_env as deployment_env
import zaza.utilities.juju as zaza_juju_utils
import zaza.openstack.utilities.juju as juju_utils
import zaza.openstack.utilities.openstack as openstack_utils
import zaza.openstack.charm_tests.glance.setup as glance_setup
Expand Down Expand Up @@ -179,7 +180,10 @@ def _get_tempest_context(workspace_path, missing_fatal=True):
ctxt['enabled_services'],
missing_fatal=missing_fatal)
_add_auth_config(ctxt)
if 'octavia' in ctxt['enabled_services']:
if (
'octavia' in ctxt['enabled_services'] and
not zaza_juju_utils.is_k8s_deployment()
):
_add_octavia_config(ctxt)
return ctxt

Expand Down

0 comments on commit d2df59c

Please sign in to comment.