Commit 8b8f5541 authored by Łukasz Nowak's avatar Łukasz Nowak

XXX

parent f5305237
...@@ -967,7 +967,6 @@ class FakeImageServerMixin(KvmMixin): ...@@ -967,7 +967,6 @@ class FakeImageServerMixin(KvmMixin):
fh.write(fake_image3_content) fh.write(fake_image3_content)
# real fake image # real fake image
cls.image_source_directory = tempfile.mkdtemp()
real_image_input = os.path.join(cls.image_source_directory, 'real.img') real_image_input = os.path.join(cls.image_source_directory, 'real.img')
subprocess.check_call([ subprocess.check_call([
cls.qemu_img, "create", "-f", "qcow2", real_image_input, "1M"]) cls.qemu_img, "create", "-f", "qcow2", real_image_input, "1M"])
...@@ -1154,7 +1153,7 @@ class TestVirtualHardDriveUrlGzipped(TestVirtualHardDriveUrl): ...@@ -1154,7 +1153,7 @@ class TestVirtualHardDriveUrlGzipped(TestVirtualHardDriveUrl):
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlList(KVMTestCase, FakeImageServerMixin): class TestBootImageUrlList(FakeImageServerMixin, KVMTestCase):
__partition_reference__ = 'biul' __partition_reference__ = 'biul'
kvm_instance_partition_reference = 'biul0' kvm_instance_partition_reference = 'biul0'
...@@ -1476,7 +1475,7 @@ class TestBootImageUrlSelectResilientJson( ...@@ -1476,7 +1475,7 @@ class TestBootImageUrlSelectResilientJson(
@skipUnlessKvm @skipUnlessKvm
class TestBootImageUrlListKvmCluster(KVMTestCase, FakeImageServerMixin): class TestBootImageUrlListKvmCluster(FakeImageServerMixin, KVMTestCase):
__partition_reference__ = 'biulkc' __partition_reference__ = 'biulkc'
@classmethod @classmethod
...@@ -1487,14 +1486,6 @@ class TestBootImageUrlListKvmCluster(KVMTestCase, FakeImageServerMixin): ...@@ -1487,14 +1486,6 @@ class TestBootImageUrlListKvmCluster(KVMTestCase, FakeImageServerMixin):
key = 'boot-image-url-list' key = 'boot-image-url-list'
config_file_name = 'boot-image-url-list.conf' config_file_name = 'boot-image-url-list.conf'
def setUp(self):
super().setUp()
self.startImageHttpServer()
def tearDown(self):
self.stopImageHttpServer()
super().tearDown()
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps({ return {'_': json.dumps({
...@@ -1798,7 +1789,7 @@ class TestDiskDevicePathWipeDiskOndestroyJson( ...@@ -1798,7 +1789,7 @@ class TestDiskDevicePathWipeDiskOndestroyJson(
@skipUnlessKvm @skipUnlessKvm
class TestImageDownloadController(KVMTestCase, FakeImageServerMixin): class TestImageDownloadController(FakeImageServerMixin, KVMTestCase):
__partition_reference__ = 'idc' __partition_reference__ = 'idc'
maxDiff = None maxDiff = None
...@@ -1816,14 +1807,12 @@ class TestImageDownloadController(KVMTestCase, FakeImageServerMixin): ...@@ -1816,14 +1807,12 @@ class TestImageDownloadController(KVMTestCase, FakeImageServerMixin):
self.working_directory, 'error_state_file') self.working_directory, 'error_state_file')
self.processed_md5sum = os.path.join( self.processed_md5sum = os.path.join(
self.working_directory, 'processed_md5sum') self.working_directory, 'processed_md5sum')
self.startImageHttpServer()
self.image_download_controller = os.path.join( self.image_download_controller = os.path.join(
self.slap.instance_directory, self.__partition_reference__ + '0', self.slap.instance_directory, self.__partition_reference__ + '0',
'software_release', 'parts', 'image-download-controller', 'software_release', 'parts', 'image-download-controller',
'image-download-controller.py') 'image-download-controller.py')
def tearDown(self): def tearDown(self):
self.stopImageHttpServer()
shutil.rmtree(self.working_directory) shutil.rmtree(self.working_directory)
super().tearDown() super().tearDown()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment