Functional tests do not fully clean up after orders

Bug #1490566 reported by Dave McCowan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
Fernando Diaz

Bug Description

The functional tests that create secrets through orders do not delete the secrets that have been created by the orders. Tests should cleanup after themselves before terminating. If not, this leaves entities in the database that can affect other tests.

Fernando Diaz (diazjf)
Changed in barbican:
status: New → In Progress
assignee: nobody → Fernando Diaz (diazjf)
Revision history for this message
Fernando Diaz (diazjf) wrote :

I believe this also happens with the barbican-client. I have pending commits that resolve it for the barbican-client. Should I open up bugs?

Revision history for this message
Fernando Diaz (diazjf) wrote :

Note: Bug can be fixed by applying the following:

In /home/stack/barbican/functionaltests/api/v1/behaviors/order_behaviors.py

def create_order(self, model, extra_headers=None, use_auth=True,
                     user_name=None, admin=None)

--> add a check to see if model.secret_ref exists. If it does then add it to the list.

def delete_all_created_orders(self)

--> remove secrets in the list as well.

Revision history for this message
Fernando Diaz (diazjf) wrote :

Note: The above must also be done for containers.

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

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

Revision history for this message
Fernando Diaz (diazjf) wrote :
Changed in barbican:
importance: Undecided → Medium
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/224990
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=dfb8d5ab937c035c90711964c5c6d701d87f5237
Submitter: Jenkins
Branch: master

commit dfb8d5ab937c035c90711964c5c6d701d87f5237
Author: Fernando Diaz <email address hidden>
Date: Thu Sep 17 23:01:13 2015 -0500

    Cleanup Secrets created after Order functional tests

    Order functional tests create secrets and containers, but
    do not remove them after testing. This patch makes sure
    the secrets and containers are removed after an order is.

    Change-Id: Ie191006acc919a07a79c0ba4b714603ecbe75da3
    Closes-Bug: 1490566

Changed in barbican:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in barbican:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: liberty-rc1 → 1.0.0
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.