]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Use tempfile and cleanup in windows unit test
authorJohn Griffith <john.griffith@solidfire.com>
Tue, 3 Sep 2013 22:33:24 +0000 (22:33 +0000)
committerJohn Griffith <john.griffith@solidfire.com>
Tue, 3 Sep 2013 22:43:06 +0000 (22:43 +0000)
commitf0ab7be7c304dad9d925dbc6a82c67ec5bbfc1da
tree3dd60c4e4e0b42ca0fe2463b5feed5d449a1b940
parent1428e6f62ca9bc194655621578c526e9d2b8980c
Use tempfile and cleanup in windows unit test

The unit test test_windows was setting and creating
a directory c://iSCSIVirtualDisks in the root path
and even worse wasn't deleting it on cleanup.

This patch converts that to use tempfile and also
adds an shutil.rmtree to the teardown method to clean
up all the junk it creates.

Fixes bug: 1219950

Change-Id: Ibd071c9c3ae9a02f26c85a09e8bc6619d8c73a37
cinder/tests/test_windows.py