Assert return value is None for commands inheriting from Command in unit tests

Bug #1550636 reported by Tang Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Tang Chen

Bug Description

Many unit tests for commands inheriting from cliff.command do not check return values of take_action() are None. We should check them.

Tang Chen (tangchen)
Changed in python-openstackclient:
assignee: nobody → Tang Chen (tangchen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

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

Reviewed: https://review.openstack.org/285646
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=058232b9998b760d508bf1e8746e429ad45e4e8d
Submitter: Jenkins
Branch: master

commit 058232b9998b760d508bf1e8746e429ad45e4e8d
Author: Tang Chen <email address hidden>
Date: Sat Feb 27 15:38:04 2016 +0800

    [Compute] Check return value is None in compute unit tests.

    take_action() in commands inheriting from Command returns nothing.
    So we should assert the return is None in the unit tests of
    these commands.

    Change-Id: I953480ecff3b5beb12255d866d0e1df45f130efd
    Partial-Bug: #1550636

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/287037
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=fd53a4980f27a72e9a0d39cde9fad01cb5c6744a
Submitter: Jenkins
Branch: master

commit fd53a4980f27a72e9a0d39cde9fad01cb5c6744a
Author: Tang Chen <email address hidden>
Date: Mon Feb 29 14:53:57 2016 +0800

    [Image] Check return value is None in image unit tests.

    take_action() in commands inheriting from Command returns nothing.
    So we should assert the return is None in the unit tests of
    these commands.

    Change-Id: I237ea772f74fa52af2e9aacd35d4b9cfb225c94c
    Partial-Bug: #1550636

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/288241
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=b58dd4f17f60b3c6347683b619c093b8d1a40c0b
Submitter: Jenkins
Branch: master

commit b58dd4f17f60b3c6347683b619c093b8d1a40c0b
Author: Tang Chen <email address hidden>
Date: Mon Feb 29 16:50:54 2016 +0800

    [Volume] Check return value is None in volume unit tests

    take_action() in commands inheriting from Command returns nothing.
    So we should assert the return is None in the unit tests of these
    commands.

    Change-Id: Idd961a5fa3db825353700837a559621d17f782c5
    Partial-Bug: #1550636

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/289805
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=762c4c9bdf66995198fa03751b861a859b9d44a1
Submitter: Jenkins
Branch: master

commit 762c4c9bdf66995198fa03751b861a859b9d44a1
Author: Tang Chen <email address hidden>
Date: Sat Mar 5 16:29:18 2016 +0800

    [Identity] Check return value is None in identity v3 unit tests

    take_action() in commands inheriting from Command returns nothing.
    So we should assert the return is None in the unit tests of these
    commands.

    Change-Id: I02af06b3d476aac2d93a23ef2111cdc7fa0892ec
    Partial-Bug: #1550636

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/290293
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=237d7feca8c56fccd65acf86736747402634aaf2
Submitter: Jenkins
Branch: master

commit 237d7feca8c56fccd65acf86736747402634aaf2
Author: Tang Chen <email address hidden>
Date: Wed Mar 9 14:17:05 2016 +0800

    [Identity] Check return value is None in identity v3 unit tests

    take_action() in commands inheriting from Command returns nothing.
    So we should assert the return is None in the unit tests of these
    commands.

    Change-Id: I53eeb88316b2c20882fed97149d55cb04bcb2b2e
    Closes-Bug: #1550636

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.4.0

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