Commit 3820b580 authored by Samuel GAIST's avatar Samuel GAIST

[test][docker_execution] Redo database root_folder setup after prefix cleanup

The prefix is resynced after the CXX tests, therefore
ensure that the original root_folder setup is applied
again.

This avoids breaking tests when CXX tests run before
the raw access tests.
parent d829ac7c
Pipeline #45636 passed with stage
in 17 minutes and 42 seconds
......@@ -109,6 +109,12 @@ def initialize_db_root_folder(database_root_folder, databases_path):
json.dump(declaration, db_file, indent=4)
def setup_root_db_folder():
initialize_db_root_folder(
os.path.join(prefix_folder, "beat_core_test"), os.path.join(prefix, "databases")
)
def setup_package():
sync_prefixes(
[
......@@ -118,9 +124,7 @@ def setup_package():
prefix_folder,
)
initialize_db_root_folder(
os.path.join(prefix_folder, "beat_core_test"), os.path.join(prefix, "databases")
)
setup_root_db_folder()
if DOCKER_NETWORK_TEST_ENABLED:
import docker
......
......@@ -49,6 +49,7 @@ from . import DOCKER_NETWORK_TEST_ENABLED
from . import network_name
from . import prefix as test_prefix
from . import prefix_folder
from . import setup_root_db_folder
from .test_execution import BaseExecutionMixIn
from .utils import DOCKER_TEST_IMAGES
from .utils import cleanup
......@@ -145,6 +146,8 @@ class TestDockerExecution(BaseExecutionMixIn):
]
)
setup_root_db_folder()
@slow
@skipif(not DOCKER_NETWORK_TEST_ENABLED, "Network test disabled")
def test_custom_network(self):
......
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