bad parameter pass in ospurge/tests/test_utils.py : test_get_resource_classes

Bug #1820033 reported by Yves-Gwenael Bourhis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ospurge
Fix Released
Undecided
Unassigned

Bug Description

In ospurge/tests/test_utils.py test_get_resource_classes we have:

    config = "Networks"
    classes = utils.get_resource_classes(config)

It's an error because we expect a list of string (as we can see in ospurge/tests/test_utils.pyi:

    def get_resource_classes(resources: Optional[Iterable[str]]=None) -> List:
        ...

This is confusing for other developers, so the unittest should pass a list of strings instead.

Changed in ospurge:
status: New → Confirmed
Revision history for this message
Yves-Gwenael Bourhis (yves-gwenael-bourhis) wrote :

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

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

Reviewed: https://review.openstack.org/643263
Committed: https://git.openstack.org/cgit/openstack/ospurge/commit/?id=8a69363f8e00b047f89c74f5a0a89d218f868a42
Submitter: Zuul
Branch: master

commit 8a69363f8e00b047f89c74f5a0a89d218f868a42
Author: Yves-Gwenael Bourhis <email address hidden>
Date: Thu Mar 14 10:39:37 2019 +0100

    Fix test_get_resource_classes parameter passing

    In utils.get_resource_classes we expect a list of strings.
    However we are passing a string.
    The test was succeding by pure luck.
    If we pass something else (such as 'Stacks') we had multiple results.
    This test was confusing for other developers implementing other tests.

    Closes-Bug: #1820033

    Change-Id: I8414b7582d94b199457a01e4916a7e7b6e51edbc

Changed in ospurge:
status: In Progress → Fix Released
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.