From 4551f665059542bac1320f3dba067209d30dd71f Mon Sep 17 00:00:00 2001 From: Alex Kavanagh <567675+ajkavanagh@users.noreply.github.com> Date: Tue, 9 Mar 2021 17:59:33 +0000 Subject: [PATCH] Fix the kerberos set-up by loosening ubuntu check (#521) * Fix the kerberos set-up by loosening ubuntu check The cs:ubuntu charm's workload-status-message has changed recently (as the charm was re-written). This PR loosens the application states check to ignore the workload-status-message and just wait for the charm to be active workload-status. This is almost certainly enough, as it's a very simple charm. * Fix tox.ini to pass tests (maybe) --- tox.ini | 20 ++++++++++++++++++++ zaza/openstack/charm_tests/kerberos/setup.py | 10 +++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index dc09948..aea173f 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,26 @@ commands = nosetests --with-coverage --cover-package=zaza.openstack {posargs} {t basepython = python3 deps = -r{toxinidir}/requirements.txt +[testenv:py3.5] +basepython = python3.5 +deps = -r{toxinidir}/requirements.txt + +[testenv:py3.6] +basepython = python3.6 +deps = -r{toxinidir}/requirements.txt + +[testenv:py3.7] +basepython = python3.7 +deps = -r{toxinidir}/requirements.txt + +[testenv:py3.8] +basepython = python3.8 +deps = -r{toxinidir}/requirements.txt + +[testenv:py3.9] +basepython = python3.9 +deps = -r{toxinidir}/requirements.txt + [testenv:pep8] basepython = python3 deps = -r{toxinidir}/requirements.txt diff --git a/zaza/openstack/charm_tests/kerberos/setup.py b/zaza/openstack/charm_tests/kerberos/setup.py index d441f8c..11f4afa 100644 --- a/zaza/openstack/charm_tests/kerberos/setup.py +++ b/zaza/openstack/charm_tests/kerberos/setup.py @@ -113,7 +113,15 @@ def retrieve_and_attach_keytab(): 'keystone_keytab', tmp_file) - zaza.model.wait_for_application_states() + # cs:ubuntu charm has changed behaviour and we can't rely on the workload + # staus message. Thus, ignore it. + states = { + "ubuntu-test-host": { + "workload-status": "active", + "workload-status-message": "", + } + } + zaza.model.wait_for_application_states(states=states) zaza.model.block_until_all_units_idle()