Make functional tests set node_staging_uri

Currently it is not possible to configure the staging directory
URI of the functional workers. We need to be able to do that in order
to enable the stage cleaning behavior. Right now, they're all sharing
/tmp/staging, which will cause workers to conflict while running in
parallel. This causes them to use their private test directory,
which may also help some other spurious failures due to interaction.

Related-Bug: #1913625
Change-Id: Ic2ac2a528206c50c38e948a096daf9eb8e5eb715
(cherry picked from commit e9852fb625)
This commit is contained in:
Dan Smith 2021-02-23 18:59:07 -08:00 committed by Abhishek Kekane
parent 9cb3240b94
commit 8e216b4913
2 changed files with 4 additions and 5 deletions

View File

@ -424,6 +424,9 @@ class ApiServer(Server):
self.send_identity_headers = False
self.node_staging_uri = 'file://%s' % os.path.join(
self.test_dir, 'staging')
self.conf_base = """[DEFAULT]
debug = %(debug)s
default_log_levels = eventlet.wsgi.server=DEBUG,stevedore.extension=INFO
@ -453,6 +456,7 @@ image_tag_quota=%(image_tag_quota)s
image_location_quota=%(image_location_quota)s
location_strategy=%(location_strategy)s
allow_additional_image_properties = True
node_staging_uri=%(node_staging_uri)s
[oslo_policy]
policy_file = %(policy_file)s
policy_default_rule = %(policy_default_rule)s

View File

@ -235,7 +235,6 @@ class TestImages(functional.FunctionalTest):
self.stop_servers()
def test_image_import_using_web_download(self):
self.config(node_staging_uri="file:///tmp/staging/")
self.start_servers(**self.__dict__.copy())
# Image list should be empty
@ -4817,7 +4816,6 @@ class TestImagesMultipleBackend(functional.MultipleBackendFunctionalTest):
self.stop_servers()
def test_image_import_using_web_download(self):
self.config(node_staging_uri="file:///tmp/staging/")
self.start_servers(**self.__dict__.copy())
# Image list should be empty
@ -4980,7 +4978,6 @@ class TestImagesMultipleBackend(functional.MultipleBackendFunctionalTest):
self.stop_servers()
def test_image_import_using_web_download_different_backend(self):
self.config(node_staging_uri="file:///tmp/staging/")
self.start_servers(**self.__dict__.copy())
# Image list should be empty
@ -5144,7 +5141,6 @@ class TestImagesMultipleBackend(functional.MultipleBackendFunctionalTest):
self.stop_servers()
def test_image_import_multi_stores(self):
self.config(node_staging_uri="file:///tmp/staging/")
self.start_servers(**self.__dict__.copy())
# Image list should be empty
@ -5759,7 +5755,6 @@ class TestImagesMultipleBackend(functional.MultipleBackendFunctionalTest):
self.stop_servers()
def test_image_import_multi_stores_specifying_all_stores(self):
self.config(node_staging_uri="file:///tmp/staging/")
self.start_servers(**self.__dict__.copy())
# Image list should be empty