Compare commits

...

3 Commits

Author SHA1 Message Date
Andreja Tonev
798903e236 Added more log directories and explicitly specified in tests 2024-02-26 18:10:37 +01:00
Marko Barišić
28f49a3b90
Merge branch 'master' into add-logs-to-ci 2024-02-07 11:33:27 +01:00
Deda
d66c66ff85 Fix paths for release test logs, add artifact uploads to debug 2024-02-07 11:31:46 +01:00
14 changed files with 186 additions and 36 deletions
.github/workflows
tests/integration
audit
auth
durability
env_variable_check
fine_grained_access
flag_check
init_file
ldap
mg_import_csv
run_time_settings
storage_mode

View File

@ -139,7 +139,7 @@ jobs:
- name: Save code coverage
uses: actions/upload-artifact@v4
with:
name: "Code coverage(Code analysis)"
name: "Code coverage (Code analysis)"
path: tools/github/generated/code_coverage.tar.gz
- name: Run clang-tidy
@ -210,9 +210,19 @@ jobs:
- name: Save cppcheck and clang-format errors
uses: actions/upload-artifact@v4
with:
name: "Code coverage(Debug build)"
name: "Code coverage (Debug build)"
path: tools/github/cppcheck_and_clang_format.txt
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Debug build)"
path: |
build/logs
/tmp/memgraph_drivers/logs
/tmp/memgraph_integration/logs
release_build:
name: "Release build"
runs-on: [self-hosted, Linux, X64, Diff]
@ -330,14 +340,12 @@ jobs:
name: "Enterprise DEB package"
path: build/output/memgraph*.deb
- name: Save test data
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test data(Release build)"
path: |
# multiple paths could be defined
build/logs
name: "Test logs (Release build)"
path: build/logs
experimental_build_ha:
name: "High availability build"
@ -377,14 +385,12 @@ jobs:
./run.sh "Coordinator"
./run.sh "Client initiated failover"
./run.sh "Uninitialized cluster"
- name: Save test data
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test data(High availability build)"
path: |
# multiple paths could be defined
build/logs
name: "Test logs (High availability build)"
path: build/logs
experimental_build_mt:
name: "MultiTenancy replication build"
@ -442,14 +448,12 @@ jobs:
./run.sh "Index replication"
./run.sh "Constraints"
- name: Save test data
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test data(MultiTenancy replication build)"
path: |
# multiple paths could be defined
build/logs
name: "Test logs (MultiTenancy replication build)"
path: build/logs
release_jepsen_test:
name: "Release Jepsen Test"

View File

@ -111,7 +111,7 @@ jobs:
- name: Save code coverage
uses: actions/upload-artifact@v4
with:
name: "Code coverage(Coverage build)"
name: "Code coverage (Coverage build)"
path: tools/github/generated/code_coverage.tar.gz
debug_build:
@ -165,9 +165,16 @@ jobs:
- name: Save cppcheck and clang-format errors
uses: actions/upload-artifact@v4
with:
name: "Code coverage(Debug build)"
name: "Code coverage (Debug build)"
path: tools/github/cppcheck_and_clang_format.txt
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Debug drivers tests)"
path: build/logs
debug_integration_test:
name: "Debug integration tests"
runs-on: [self-hosted, Linux, X64, Debian10]
@ -198,6 +205,13 @@ jobs:
run: |
tests/integration/run.sh
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Debug integration tests)"
path: build/logs
release_build:
name: "Release build"
runs-on: [self-hosted, Linux, X64, Debian10]
@ -369,6 +383,13 @@ jobs:
cd ../pulsar
docker-compose down
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Release e2e tests)"
path: build/logs
release_durability_stress_tests:
name: "Release durability and stress tests"
runs-on: [self-hosted, Linux, X64, Debian10]
@ -417,6 +438,13 @@ jobs:
source ve3/bin/activate
python3 durability --num-steps 20
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Release durability and stress)"
path: build/logs
release_jepsen_test:
name: "Release Jepsen Test"
runs-on: [self-hosted, Linux, X64, Debian10, JepsenControl]

View File

@ -107,7 +107,7 @@ jobs:
- name: Save code coverage
uses: actions/upload-artifact@v4
with:
name: "Code coverage(Coverage build)"
name: "Code coverage (Coverage build)"
path: tools/github/generated/code_coverage.tar.gz
debug_build:
@ -161,9 +161,16 @@ jobs:
- name: Save cppcheck and clang-format errors
uses: actions/upload-artifact@v4
with:
name: "Code coverage(Debug build)"
name: "Code coverage (Debug build)"
path: tools/github/cppcheck_and_clang_format.txt
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Debug drivers tests)"
path: build/logs
debug_integration_test:
name: "Debug integration tests"
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
@ -194,6 +201,13 @@ jobs:
run: |
tests/integration/run.sh
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Debug integration tests)"
path: build/logs
release_build:
name: "Release build"
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
@ -365,6 +379,13 @@ jobs:
cd ../pulsar
docker-compose down
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Release e2e tests)"
path: build/logs
release_durability_stress_tests:
name: "Release durability and stress tests"
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
@ -412,3 +433,10 @@ jobs:
cd tests/stress
source ve3/bin/activate
python3 durability --num-steps 20
- name: Save test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test logs (Release durability and stress)"
path: build/logs

View File

@ -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",
]

View File

@ -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(

View File

@ -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

View File

@ -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:

View File

@ -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(

View File

@ -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:

View 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)

View File

@ -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("_", "-")

View File

@ -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

View File

@ -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")

View File

@ -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)