Skip to content

Commit 517e835

Browse files
authored
Add v3.7 smoke tests (#680)
- [x] `LOAD PARQUET` ### NOTE: The below TODOs will probably be moved under the memgraph/memgraph repo after the mage merge. - [ ] Test the HA upgrade scenario, interesting details under (test entities that should be preserved across any upgrade) https://memgraph.slack.com/archives/CS5827FK3/p1743138541518649 - [ ] Test different HA sync modes (`SYNC`, `ASYNC`, `STRICT SYNC`) - [ ] Try testing Kafka and Pulsar (streams) somehow - [ ] Test Docker compose - [ ] Test query modules better: - [ ] Run a/all procedures from all query modules to make sure they are all working, because of cases like #594, OR make sure all C/C++/Python/Rust dependencies can be loaded - [ ] Figure out the module count because that always fails -> probably by some kind of build-time manifest file - [ ] Search for the query module mappings file - [ ] Make a variant of the `test_single_mage.bash` where property compression is enabled (TODO under `mgconsole/storage.bash`) - [ ] Get rid of the `Error response from daemon: No such container: memgraph_last_data` (it works, it's just an edge case when deallocating containers) #659 << PREV
1 parent fa8935b commit 517e835

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
id
2+
1
406 Bytes
Binary file not shown.

smoke-release-testing/experiment.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ source "$SCRIPT_DIR/utils.bash"
55
# NOTE: Use the below line if you just want to spin up the containers and leave them running.
66
# run_memgraph_docker_containers RC RC
77
# NOTE: Use the below line if you want to cleanup the containers after run of this script.
8-
spinup_and_cleanup_memgraph_dockers none none
8+
spinup_and_cleanup_memgraph_dockers none RC
99
echo "Waiting for memgraph to initialize..."
1010
wait_for_memgraph $MEMGRAPH_DEFAULT_HOST $MEMGRAPH_NEXT_DATA_BOLT_PORT
1111
echo "Memgraph is up and running!"
1212

13-
source ./mgconsole/user_profiles.bash
14-
test_user_profiles $MEMGRAPH_DEFAULT_HOST $MEMGRAPH_NEXT_DATA_BOLT_PORT
13+
source ./mgconsole/load_xyz.bash
14+
test_load_parquet $MEMGRAPH_DEFAULT_HOST $MEMGRAPH_NEXT_DATA_BOLT_PORT
1515

1616
# NOTE: Test what's the exit status of the script by using `echo $?`:
1717
# * if it's == 0 -> all good
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3+
source "$SCRIPT_DIR/../utils.bash"
4+
5+
test_load_parquet() {
6+
# Added in v3.7.
7+
echo "FEATURE: LOAD PARQUET"
8+
run_next "MATCH (n) DETACH DELETE n;"
9+
run_next "LOAD PARQUET FROM '/data/nodes.parquet' AS row CREATE (n:Node {id: row.id});"
10+
run_next_csv "MATCH (n) RETURN n;" | python3 $SCRIPT_DIR/validator.py validate_number_of_results -e 1
11+
}

smoke-release-testing/test_single_mage.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ test_or_expression_for_labels
4848
test_shortest_paths
4949
test_text_search
5050
test_durability
51+
test_load_parquet
5152

5253
# NOTE: If the testing container is NOT restarted (each test having their own
5354
# container), all the auth test have to come after all tests that assume there

smoke-release-testing/utils.bash

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ check_dockerhub_images
4747
MEMGRAPH_GENERAL_FLAGS="--telemetry-enabled=false --log-level=TRACE --also-log-to-stderr"
4848
MEMGRAPH_ENTERPRISE_DOCKER_ENVS="-e MEMGRAPH_ENTERPRISE_LICENSE=$MEMGRAPH_ENTERPRISE_LICENSE -e MEMGRAPH_ORGANIZATION_NAME=$MEMGRAPH_ORGANIZATION_NAME"
4949
MEMGRAPH_DOCKER_MOUNT_VOLUME_FLAGS="-v mg_lib:/var/lib/memgraph"
50+
MEMGRAPH_DOCKER_LOCAL_DATA_MOUNT_VOLUME_FLAGS="-v $SCRIPT_DIR/data:/data"
5051
MEMGRAPH_FULL_PROPERTIES_SET="{id:0, name:\"tester\", age:37, height:175.0, merried:true}"
5152
MEMGRAPH_PROPERTY_COMPRESSION_FLAGS="--storage-property-store-compression-enabled=true --storage-property-store-compression-level=mid"
5253
MEMGRAPH_HA_COORDINATOR_FLAGS="--coordinator-port=10001 --bolt-port=7687 --coordinator-id=1 --experimental-enabled=high-availability --coordinator-hostname=localhost --management-port=11001"
@@ -219,6 +220,7 @@ pull_docker_images() {
219220
run_memgraph_last_dockerhub_container() {
220221
if [ ! "$(docker ps -q -f name=memgraph_last_data)" ]; then
221222
docker run -d --rm -p $MEMGRAPH_LAST_DATA_BOLT_PORT:7687 -p $MEMGRAPH_LAST_MONITORING_PORT:9091 \
223+
$MEMGRAPH_DOCKER_LOCAL_DATA_MOUNT_VOLUME_FLAGS \
222224
--name memgraph_last_data \
223225
$MEMGRAPH_LAST_DOCKERHUB_IMAGE $MEMGRAPH_GENERAL_FLAGS
224226
fi
@@ -227,6 +229,7 @@ run_memgraph_last_dockerhub_container() {
227229
run_memgraph_next_dockerhub_container() {
228230
if [ ! "$(docker ps -q -f name=memgraph_next_data)" ]; then
229231
docker run -d --rm -p $MEMGRAPH_NEXT_DATA_BOLT_PORT:7687 -p $MEMGRAPH_NEXT_MONITORING_PORT:9091 \
232+
$MEMGRAPH_DOCKER_LOCAL_DATA_MOUNT_VOLUME_FLAGS \
230233
--name memgraph_next_data \
231234
$MEMGRAPH_ENTERPRISE_DOCKER_ENVS $MEMGRAPH_NEXT_DOCKERHUB_IMAGE $MEMGRAPH_GENERAL_FLAGS \
232235
$MEMGRAPH_PROPERTY_COMPRESSION_FLAGS $MEMGRAPH_SHOW_SCHEMA_INFO_FLAG

0 commit comments

Comments
 (0)