Comment 6 for bug 2016144

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/880340
Committed: https://opendev.org/openstack/neutron/commit/6efae0b110af0ea6ee92a9ef774cd702db3b834e
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 6efae0b110af0ea6ee92a9ef774cd702db3b834e
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Apr 13 17:54:47 2023 +0200

    Do not check the context object in ``TestMeteringPlugin``

    Since [1], the admin context is not ``Context`` object created
    but the new one created in ``ContextBase.elevated``. This method
    copies the object itself (creating a new one), adds the "admin"
    role (if not present) and returns this new object.

    Because this method always returns a new object, it is not possible
    to check the ``Context`` object used to make the function call, as
    long as the test doesn't store the elevated context used in the call
    (apart from the reference stored in the mock object).

    [1]https://review.opendev.org/c/openstack/neutron-lib/+/880143

    Closes-Bug: #2016144
    Change-Id: I5d7eb73606428841caa24ce1e38d1bebd5db0a9b
    (cherry picked from commit c7ef8249419ecbefdc4a604a98d4b23554c78dae)