Unittests leaving a dirty /tmp directory

Bug #1472245 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Lucas Alvares Gomes

Bug Description

When running the unittests it's leaving the /tmp directory dirty. It's creating 2 files prefixed with "configdrive" on every run, e.g:

(venv)[lucasagomes@lucasagomes ironic]$ ls -la /tmp/configdrive*
-rw------- 1 lucasagomes lucasagomes 0 Jul 7 13:34 /tmp/configdrive2FML5i
-rw------- 1 lucasagomes lucasagomes 0 Jul 7 13:34 /tmp/configdriveDxy_JS
-rw------- 1 lucasagomes lucasagomes 0 Jul 7 13:34 /tmp/configdrivefdIpBq
-rw------- 1 lucasagomes lucasagomes 0 Jul 7 13:32 /tmp/configdriveo0prQ7
-rw------- 1 lucasagomes lucasagomes 0 Jul 7 13:32 /tmp/configdrivePRVoqD
-rw------- 1 lucasagomes lucasagomes 0 Jul 7 13:34 /tmp/configdriveZFtmBK

We should mock the file creation.

How to reproduce:

1 - Run the unittests
2- Check the /tmp directory

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Medium
Changed in ironic:
status: New → In Progress
Revision history for this message
Dmitry Tantsur (divius) wrote :

Importance low as it does not affect actual features

Changed in ironic:
importance: Medium → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/199078
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=65b219d02fb0398195cb563016edd745670f7290
Submitter: Jenkins
Branch: master

commit 65b219d02fb0398195cb563016edd745670f7290
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Jul 7 13:36:38 2015 +0100

    Mock the file creation for the GetConfigdriveTestCase tests

    The patch mock the call to the tempfile.NamedTemporaryFile in the
    GetConfigdriveTestCase test cases.

    Closes-Bug: #1472245
    Change-Id: Id92fd34ee334a0a8df618b8814be19d06a907436

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
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.