functional test fails on parsing output

Bug #1651047 reported by Jeremy Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-barbicanclient
Fix Released
Undecided
Jeremy Liu

Bug Description

Currently, I'm running functional test for barbicanclient and get error on some testcases. The captured output is as below:

======================================================================
ERROR: functionaltests.cli.v1.smoke.test_acl.ACLTestCase.test_acl_submit_short_arg_true
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/root/git.openstack.org/python-barbicanclient/functionaltests/utils.py", line 59, in wrapper
    return func(self, *test_args, **test_kwargs)
  File "/root/git.openstack.org/python-barbicanclient/functionaltests/cli/v1/smoke/test_acl.py", line 51, in test_acl_submit
    use_short_arg=use_short_arg)
  File "/root/git.openstack.org/python-barbicanclient/functionaltests/cli/v1/behaviors/acl_behaviors.py", line 121, in acl_submit
    acl_list = self._prettytable_to_list(stdout)
  File "/root/git.openstack.org/python-barbicanclient/functionaltests/cli/v1/behaviors/base_behaviors.py", line 128, in _prettytable_to_list
    rows = re.findall('\|(.*)?\n', str)
  File "/root/git.openstack.org/python-barbicanclient/.tox/functional/lib64/python2.7/re.py", line 177, in findall
    return _compile(pattern, flags).findall(string)
  File "/root/git.openstack.org/python-barbicanclient/.tox/functional/lib64/python2.7/re.py", line 242, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat

Digging into the code in "python-barbicanclient/functionaltests/cli/v1/behaviors/base_behaviors.py", the regex for parsing output is not correctly written, and this seems to happen on some python versions. See https://bugs.python.org/issue18647

Jeremy Liu (liujiong)
Changed in python-barbicanclient:
assignee: nobody → Jeremy Liu (liujiong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-barbicanclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/412327

Changed in python-barbicanclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-barbicanclient (master)

Reviewed: https://review.openstack.org/412327
Committed: https://git.openstack.org/cgit/openstack/python-barbicanclient/commit/?id=777b8b68f60fcf1dd903bda0c0352e9f0dd72edf
Submitter: Jenkins
Branch: master

commit 777b8b68f60fcf1dd903bda0c0352e9f0dd72edf
Author: Jeremy Liu <email address hidden>
Date: Mon Dec 19 15:28:32 2016 +0800

    Correct the regex for parsing output

    Change-Id: I9f2c72e89bd7305277d7a531c719e02423e1dccb
    Closes-Bug: #1651047

Changed in python-barbicanclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-barbicanclient 4.3.0

This issue was fixed in the openstack/python-barbicanclient 4.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.