Fix bug in scenario/manager and cover it with pep8

manager.py had a syntax error which caused the module to be not
installable.  This wasn't picked up in testing.  This fixes the bug
and adds pep8 coverage to the nova_lxd_tempest_plugin so that the module
always remains installable.

Also, this fixes the tempest concurrency at 1.  See the related bugs.

Closes-bug: #1790956
Related-Bug: #1790943
Change-Id: Ie542b062a9f0997f6363877ff03f0f9bfc8f3d43
This commit is contained in:
Alex Kavanagh 2018-09-03 11:33:57 +01:00 committed by Ryan Beisner
parent bc8d540c95
commit c4c16bcf49
4 changed files with 8 additions and 10 deletions

View File

@ -87,3 +87,7 @@ r="$r|(?:.*ServerShowV263Test.test_show_update_rebuild_list_server.*)"
r="$r).*$"
export DEVSTACK_GATE_TEMPEST_REGEX="$r"
# set the concurrency to 1 for devstack-gate
# See: https://bugs.launchpad.net/nova-lxd/+bug/1790943
export TEMPEST_CONCURRENCY=1

View File

@ -16,10 +16,8 @@
import subprocess
import netaddr
from oslo_log import log
from oslo_serialization import jsonutils as json
from oslo_utils import netutils
from tempest.common import compute
from tempest.common import image as common_image
@ -565,7 +563,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
ip=ip_address,
timeout=timeout,
should_succeed=('reachable' if should_succeed
else 'unreachable'))
else 'unreachable')))
result = test_utils.call_until_true(ping, timeout, 1)
LOG.debug("{caller} finishes ping {ip} in {timeout} sec and the "
"ping result is {result}"

View File

@ -14,18 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import time
from oslo_log import log as logging
import testtools
from tempest.common import waiters
from tempest import config
from tempest import exceptions
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from nova_lxd_tempest_plugin.tests.scenario import manager

View File

@ -41,7 +41,9 @@ commands =
[testenv:pep8]
basepython = python3
deps = {[testenv]deps}
commands = flake8 {toxinidir}/nova
commands =
flake8 {toxinidir}/nova
flake8 {toxinidir}/nova_lxd_tempest_plugin
[testenv:venv]
basepython = python3