Added more log directories and explicitly specified in tests
This commit is contained in:
parent
28f49a3b90
commit
798903e236
5
.github/workflows/diff.yaml
vendored
5
.github/workflows/diff.yaml
vendored
@ -218,7 +218,10 @@ jobs:
|
||||
if: always()
|
||||
with:
|
||||
name: "Test logs (Debug build)"
|
||||
path: build/logs
|
||||
path: |
|
||||
build/logs
|
||||
/tmp/memgraph_drivers/logs
|
||||
/tmp/memgraph_integration/logs
|
||||
|
||||
release_build:
|
||||
name: "Release build"
|
||||
|
@ -80,7 +80,7 @@ def execute_test(memgraph_binary, tester_binary):
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--audit-enabled",
|
||||
"--log-file=memgraph.log",
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
"--log-level=TRACE",
|
||||
]
|
||||
|
||||
|
@ -131,7 +131,12 @@ def check_permissions(query_perms, user_perms):
|
||||
|
||||
def execute_test(memgraph_binary, tester_binary, checker_binary):
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
memgraph_args = [memgraph_binary, "--data-directory", storage_directory.name]
|
||||
memgraph_args = [
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
def execute_admin_queries(queries):
|
||||
return execute_tester(
|
||||
|
@ -73,6 +73,7 @@ def execute_test(memgraph_binary, dump_binary, test_directory, test_type, write_
|
||||
"--storage-properties-on-edges",
|
||||
"--data-directory",
|
||||
working_data_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
# Start the memgraph binary
|
||||
|
@ -112,7 +112,12 @@ def test_with_passfile_env_variable(storage_directory: tempfile.TemporaryDirecto
|
||||
|
||||
def execute_test(memgraph_binary: str, tester_binary: str) -> None:
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
memgraph_args = [memgraph_binary, "--data-directory", storage_directory.name]
|
||||
memgraph_args = [
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
return_to_prev_state = {}
|
||||
if "MEMGRAPH_USER" in os.environ:
|
||||
|
@ -61,7 +61,12 @@ def execute_filtering(
|
||||
|
||||
def execute_test(memgraph_binary: str, tester_binary: str, filtering_binary: str) -> None:
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
memgraph_args = [memgraph_binary, "--data-directory", storage_directory.name]
|
||||
memgraph_args = [
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
def execute_admin_queries(queries):
|
||||
return execute_tester(
|
||||
|
@ -124,7 +124,12 @@ def test_init_and_init_data_file(flag_checker_binary: str, tester_binary: str, m
|
||||
|
||||
def execute_test(memgraph_binary: str, tester_binary: str, flag_checker_binary: str) -> None:
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
memgraph_args = [memgraph_binary, "--data-directory", storage_directory.name]
|
||||
memgraph_args = [
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
# Start the memgraph binary
|
||||
with open(os.path.join(os.getcwd(), "dummy_init_file.cypherl"), "w") as temp_file:
|
||||
|
@ -39,10 +39,28 @@ def terminate_memgraph(memgraph):
|
||||
def execute_test_restart_memgraph_with_init_file(memgraph_binary: str, tester_binary: str) -> None:
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
tester_args = [tester_binary, "--username", "memgraph1", "--password", "1234"]
|
||||
memgraph = prepare_memgraph([memgraph_binary, "--data-directory", storage_directory.name, "--init-file", INIT_FILE])
|
||||
memgraph = prepare_memgraph(
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--init-file",
|
||||
INIT_FILE,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
subprocess.run(tester_args, stdout=subprocess.PIPE, check=True).check_returncode()
|
||||
terminate_memgraph(memgraph)
|
||||
memgraph = prepare_memgraph([memgraph_binary, "--data-directory", storage_directory.name, "--init-file", INIT_FILE])
|
||||
memgraph = prepare_memgraph(
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--init-file",
|
||||
INIT_FILE,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
subprocess.run(tester_args, stdout=subprocess.PIPE, check=True).check_returncode()
|
||||
terminate_memgraph(memgraph)
|
||||
|
||||
|
@ -109,6 +109,7 @@ class Memgraph:
|
||||
self._storage_directory.name,
|
||||
"--auth-module-executable",
|
||||
kwargs.pop("module_executable", self._auth_module),
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
for key, value in kwargs.items():
|
||||
ldap_key = "--auth-module-" + key.replace("_", "-")
|
||||
|
@ -51,7 +51,12 @@ def verify_lifetime(memgraph_binary, mg_import_csv_binary):
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
|
||||
# Generate common args
|
||||
common_args = ["--data-directory", storage_directory.name, "--storage-properties-on-edges=false"]
|
||||
common_args = [
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--storage-properties-on-edges=false",
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
# Start the memgraph binary
|
||||
memgraph_args = [memgraph_binary, "--storage-recover-on-startup"] + common_args
|
||||
@ -109,6 +114,7 @@ def execute_test(name, test_path, test_config, memgraph_binary, mg_import_csv_bi
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--storage-properties-on-edges=" + str(properties_on_edges).lower(),
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
# Generate mg_import_csv args using flags specified in the test
|
||||
|
@ -183,7 +183,12 @@ def execute_test(
|
||||
memgraph_binary: str, tester_binary: str, flag_tester_binary: str, executor_binary: str, test_config_binary: str
|
||||
) -> None:
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
memgraph_args = [memgraph_binary, "--data-directory", storage_directory.name]
|
||||
memgraph_args = [
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
|
||||
print("\033[1;36m~~ Starting run-time settings check test ~~\033[0m")
|
||||
|
||||
|
@ -69,7 +69,14 @@ def execute_test_analytical_mode(memgraph_binary: str, tester_binary: str) -> No
|
||||
return execute_tester(tester_binary, queries, should_fail=False, check_failure=True, username="", password="")
|
||||
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
memgraph = prepare_memgraph([memgraph_binary, "--data-directory", storage_directory.name])
|
||||
memgraph = prepare_memgraph(
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
|
||||
print("\033[1;36m~~ Starting creating & loading snapshot test ~~\033[0m")
|
||||
|
||||
@ -90,7 +97,13 @@ def execute_test_analytical_mode(memgraph_binary: str, tester_binary: str) -> No
|
||||
|
||||
# Start the memgraph binary
|
||||
memgraph = prepare_memgraph(
|
||||
[memgraph_binary, "--data-directory", storage_directory.name, "--storage-recover-on-startup=true"]
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--storage-recover-on-startup=true",
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
|
||||
execute_queries(assertion_queries)
|
||||
@ -110,7 +123,14 @@ def execute_test_switch_analytical_transactional(memgraph_binary: str, tester_bi
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
|
||||
# Start the memgraph binary
|
||||
memgraph = prepare_memgraph([memgraph_binary, "--data-directory", storage_directory.name])
|
||||
memgraph = prepare_memgraph(
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
|
||||
print("\033[1;36m~~ Starting switch storage modes test ~~\033[0m")
|
||||
|
||||
@ -138,7 +158,13 @@ def execute_test_switch_analytical_transactional(memgraph_binary: str, tester_bi
|
||||
print("\033[1;36m~~ Starting memgraph with snapshot recovery ~~\033[0m\n")
|
||||
|
||||
memgraph = prepare_memgraph(
|
||||
[memgraph_binary, "--data-directory", storage_directory.name, "--storage-recover-on-startup=true"]
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--storage-recover-on-startup=true",
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
|
||||
execute_queries(assertion_queries)
|
||||
@ -159,7 +185,14 @@ def execute_test_switch_transactional_analytical(memgraph_binary: str, tester_bi
|
||||
storage_directory = tempfile.TemporaryDirectory()
|
||||
|
||||
# Start the memgraph binary
|
||||
memgraph = prepare_memgraph([memgraph_binary, "--data-directory", storage_directory.name])
|
||||
memgraph = prepare_memgraph(
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
|
||||
print("\033[1;36m~~ Starting switch storage modes test ~~\033[0m")
|
||||
|
||||
@ -184,7 +217,13 @@ def execute_test_switch_transactional_analytical(memgraph_binary: str, tester_bi
|
||||
print("\033[1;36m~~ Starting memgraph with snapshot recovery ~~\033[0m\n")
|
||||
|
||||
memgraph = prepare_memgraph(
|
||||
[memgraph_binary, "--data-directory", storage_directory.name, "--storage-recover-on-startup=true"]
|
||||
[
|
||||
memgraph_binary,
|
||||
"--data-directory",
|
||||
storage_directory.name,
|
||||
"--storage-recover-on-startup=true",
|
||||
"--log-file=/tmp/memgraph_integration/logs/memgraph.log",
|
||||
]
|
||||
)
|
||||
|
||||
execute_queries(assertion_queries)
|
||||
|
Loading…
Reference in New Issue
Block a user