diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-06-10 14:49:34 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-06-10 14:49:34 -0400 |
commit | cb74876aa4c9e81eab4f1f0fa4967988f708db15 (patch) | |
tree | 4f0690a30e930cd1ebb830d469b1c7441acae48d /tests | |
parent | 8da73fb6ccb0d99c7e5183257c4cbd2dd94719f1 (diff) | |
download | vyos-cloud-init-cb74876aa4c9e81eab4f1f0fa4967988f708db15.tar.gz vyos-cloud-init-cb74876aa4c9e81eab4f1f0fa4967988f708db15.zip |
fix one large source of leaked tmpfiles
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index c809117b..ec57cff1 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -146,7 +146,9 @@ class TestSmartOSDataSource(FilesystemMockingTestCase): self.addCleanup(shutil.rmtree, self.tmp) self.paths = c_helpers.Paths({'cloud_dir': self.tmp}) - self.legacy_user_d = tempfile.mkdtemp() + self.legacy_user_d = os.path.join(self.tmp, 'legacy_user_tmp') + os.mkdir(self.legacy_user_d) + self.orig_lud = DataSourceSmartOS.LEGACY_USER_D DataSourceSmartOS.LEGACY_USER_D = self.legacy_user_d |