Misuse of assertGreaterEqual in a notification functional test

Bug #1843885 reported by Takashi Natsume
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Takashi Natsume

Bug Description

At [1], there is a misuse of assertGreaterEqual

self.assertGreaterEqual(6, len(fake_notifier.VERSIONED_NOTIFICATIONS),

It should be as follows:

self.assertGreaterEqual(len(fake_notifier.VERSIONED_NOTIFICATIONS), 6

https://github.com/openstack/nova/blob/db5caf2ff8f33e8b3e7f28f041127ee4ac8b1897/nova/tests/functional/notification_sample_tests/test_instance.py#L316-L317 [1]
https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertGreaterEqual

Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/682025

Changed in nova:
status: New → In Progress
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/682168

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

Reviewed: https://review.opendev.org/682025
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4e0e0a6dd26fac7d4051b0982ca20081eede8573
Submitter: Zuul
Branch: master

commit 4e0e0a6dd26fac7d4051b0982ca20081eede8573
Author: Takashi NATSUME <email address hidden>
Date: Fri Sep 13 20:05:49 2019 +0900

    Fix a misuse of assertGreaterEqual

    In a notification sample functional test,
    there is a misuse of assertGreaterEqual.

    At least 6 notifications are expected,
    So the order of the arguments should be reversed.

    Change-Id: I865c215a13fa3bb72e191382187ea8368885846f
    Closes-Bug: #1843885

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/stein)

Reviewed: https://review.opendev.org/682168
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bd669a5352ee0f8e956fa75720c183e4c1f3ca18
Submitter: Zuul
Branch: stable/stein

commit bd669a5352ee0f8e956fa75720c183e4c1f3ca18
Author: Takashi NATSUME <email address hidden>
Date: Fri Sep 13 20:05:49 2019 +0900

    Fix a misuse of assertGreaterEqual

    In a notification sample functional test,
    there is a misuse of assertGreaterEqual.

    At least 6 notifications are expected,
    So the order of the arguments should be reversed.

    Change-Id: I865c215a13fa3bb72e191382187ea8368885846f
    Closes-Bug: #1843885
    (cherry picked from commit 4e0e0a6dd26fac7d4051b0982ca20081eede8573)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.3

This issue was fixed in the openstack/nova 19.0.3 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.