Subscription UT error in Zuul

Bug #2007524 reported by Ai Hamano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-tackerclient
Fix Released
Undecided
Ai Hamano

Bug Description

The following error occurs in Zuul.
-----
ft1.2: tackerclient.tests.unit.osc.v1.test_vnflcm_subsc.TestListLccnSubscription.test_take_action_with_paginationtesttools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/zuul/src/opendev.org/openstack/python-tackerclient/tackerclient/tests/unit/osc/v1/test_vnflcm_subsc.py", line 139, in test_take_action_with_pagination
    expected_data.append(vnflcm_subsc_fakes.get_subscription_data(
  File "/home/zuul/src/opendev.org/openstack/python-tackerclient/tackerclient/tests/unit/osc/v1/vnflcm_subsc_fakes.py", line 166, in get_subscription_data
    subscription.pop(item)
KeyError: 'filter'
-----

This is because one test data is used in multiple tests.
So it has to be modified to create test data for each test.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tackerclient (master)
Changed in python-tackerclient:
status: New → In Progress
Ai Hamano (haman0)
Changed in python-tackerclient:
assignee: nobody → Ai Hamano (haman0)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tackerclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-tackerclient/+/873856
Committed: https://opendev.org/openstack/python-tackerclient/commit/a41323dc1df66ebd86e96e65137f3c7e2363b7f4
Submitter: "Zuul (22348)"
Branch: master

commit a41323dc1df66ebd86e96e65137f3c7e2363b7f4
Author: Ai Hamano <email address hidden>
Date: Thu Feb 16 15:59:24 2023 +0900

    Fix list VNF/Subscription UT error

    This patch resolves the following error caused by using one data in
    multiple tests.
    -----
    ft1.2: tackerclient.tests.unit.osc.v1.test_vnflcm_subsc.
    TestListLccnSubscription.test_take_action_with_
    paginationtesttools.testresult.real._StringException:
     Traceback (most recent call last):
      File "/home/zuul/src/opendev.org/openstack/
    python-tackerclient/tackerclient/tests/unit/osc/v1
    /test_vnflcm_subsc.py", line 139, in test_take_action_with_
    pagination
        expected_data.append(vnflcm_subsc_fakes.get_subscription_
    data(
      File "/home/zuul/src/opendev.org/openstack
    /python-tackerclient/tackerclient/tests/unit/osc/v1
    /vnflcm_subsc_fakes.py", line 166, in get_subscription_data
        subscription.pop(item)
    KeyError: 'filter'
    -----

    Add test data for each test.
    (Three data are set for each test data so that the first, last, and
    other values can be checked.)
    And change not to modify test data directly in get method.

    Closes-Bug: #2007524
    Change-Id: Id3919fc638f6b858c115a3a7d7e4ca60036217d4

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

This issue was fixed in the openstack/python-tackerclient 1.13.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.