tempest tests doesn't clean env after test

Bug #1644747 reported by Shu Yingya
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Data Processing ("Sahara") sahara-tests
Fix Released
Undecided
Raissa Sarmento

Bug Description

Everytime I execute sahara tempest test in tempest dir with cmd "tempest run --regex sahara_tempest_plugin.tests.cli.test_scenario.Scenario". Two projects and Two users will be created. We should clean env after test.

Example
tempest|master ⇒ openstack project list
+----------------------------------+------------------------------------+
| ID | Name |
+----------------------------------+------------------------------------+
| fe0c45eadc904e7da8cd6c965dc46eca | tempest-BaseTestCase-1506269193 |
| ff1bf41cf7354a3e90af6dd0d33e7c66 | tempest-BaseTestCase-107206449 |
...
| f95badf3120744898deaa992ebdf3040 | tempest-JobExecutionTest-18535624 |
| ffb63a5dd4a74a349ae8ebdb9a5766cb | tempest-BaseTestCase-816377528 |
+----------------------------------+------------------------------------+

tempest|master ⇒ openstack user list
+----------------------------------+------------------------------------+
| ID | Name |
+----------------------------------+------------------------------------+
| b05ef0a9a26a4e1e8f1b138b71789f5a | tempest-JobExecutionTest-18535624 |
| 531204c1901a4c8eaaadc5cf71516ce0 | tempest-JobExecutionTest-456579384 |
...
| 4c987b920cfb4d1c9f00e6eaae8617bc | tempest-BaseTestCase-616655446 |
| 1aec5d8472db4ffeb96b7d250396653d | tempest-BaseTestCase-1316509084 |
+----------------------------------+------------------------------------+

Shu Yingya (felixshu)
Changed in sahara-tests:
assignee: nobody → Shu Yingya (felixshu)
Revision history for this message
Shu Yingya (felixshu) wrote :

It mainly call by this sentence in the "sahara-tests/sahara_tempest_plugin/tests/cli/base.py L50"

self.client_manager_admin = BaseTestCase.get_client_manager('admin')
auth_provider = self.client_manager_admin.auth_provider
self.project_network = BaseTestCase.get_tenant_network('admin')

there are two client be created. But it doesn't clean after test.

Revision history for this message
Luigi Toscano (ltoscano) wrote :

We need some addCleanup somewhere then :)

Changed in sahara-tests:
status: New → Confirmed
Changed in sahara-tests:
assignee: Shu Yingya (felixshu) → Raissa Sarmento (rdearauj)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara-tests (master)

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

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

Reviewed: https://review.openstack.org/437706
Committed: https://git.openstack.org/cgit/openstack/sahara-tests/commit/?id=eeaf64b7e11a8d1b8df9a18afeb1c444b250b59d
Submitter: Jenkins
Branch: master

commit eeaf64b7e11a8d1b8df9a18afeb1c444b250b59d
Author: Raissa Sarmento <email address hidden>
Date: Thu Feb 23 22:17:31 2017 +0000

    Clean resources created in CLI tests

    The CLI tests were creating users, projects, routers and networks
    but they were not cleaning after themselves at the end of the test run.
    This is due to the use of tempest.test.BaseTestCase class methods
    in the base class.

    Change-Id: Ied79b3954ff2092f6c2003e6785a98b465005f48
    Closes-bug: 1644747

Changed in sahara-tests:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-tests 0.4.1

This issue was fixed in the openstack/sahara-tests 0.4.1 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.