diff --git a/smoke-release-testing/data/nodes.csv b/smoke-release-testing/data/nodes.csv new file mode 100644 index 000000000..3ff3deb87 --- /dev/null +++ b/smoke-release-testing/data/nodes.csv @@ -0,0 +1,2 @@ +id +1 diff --git a/smoke-release-testing/data/nodes.parquet b/smoke-release-testing/data/nodes.parquet new file mode 100644 index 000000000..dfdca9739 Binary files /dev/null and b/smoke-release-testing/data/nodes.parquet differ diff --git a/smoke-release-testing/experiment.bash b/smoke-release-testing/experiment.bash index 84ca44e8d..3e1a5e7f3 100755 --- a/smoke-release-testing/experiment.bash +++ b/smoke-release-testing/experiment.bash @@ -5,13 +5,13 @@ source "$SCRIPT_DIR/utils.bash" # NOTE: Use the below line if you just want to spin up the containers and leave them running. # run_memgraph_docker_containers RC RC # NOTE: Use the below line if you want to cleanup the containers after run of this script. -spinup_and_cleanup_memgraph_dockers none none +spinup_and_cleanup_memgraph_dockers none RC echo "Waiting for memgraph to initialize..." wait_for_memgraph $MEMGRAPH_DEFAULT_HOST $MEMGRAPH_NEXT_DATA_BOLT_PORT echo "Memgraph is up and running!" -source ./mgconsole/user_profiles.bash -test_user_profiles $MEMGRAPH_DEFAULT_HOST $MEMGRAPH_NEXT_DATA_BOLT_PORT +source ./mgconsole/load_xyz.bash +test_load_parquet $MEMGRAPH_DEFAULT_HOST $MEMGRAPH_NEXT_DATA_BOLT_PORT # NOTE: Test what's the exit status of the script by using `echo $?`: # * if it's == 0 -> all good diff --git a/smoke-release-testing/mgconsole/load_xyz.bash b/smoke-release-testing/mgconsole/load_xyz.bash new file mode 100755 index 000000000..6145025d3 --- /dev/null +++ b/smoke-release-testing/mgconsole/load_xyz.bash @@ -0,0 +1,11 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source "$SCRIPT_DIR/../utils.bash" + +test_load_parquet() { + # Added in v3.7. + echo "FEATURE: LOAD PARQUET" + run_next "MATCH (n) DETACH DELETE n;" + run_next "LOAD PARQUET FROM '/data/nodes.parquet' AS row CREATE (n:Node {id: row.id});" + run_next_csv "MATCH (n) RETURN n;" | python3 $SCRIPT_DIR/validator.py validate_number_of_results -e 1 +} diff --git a/smoke-release-testing/test_single_mage.bash b/smoke-release-testing/test_single_mage.bash index 6df51121b..f3d60b174 100755 --- a/smoke-release-testing/test_single_mage.bash +++ b/smoke-release-testing/test_single_mage.bash @@ -48,6 +48,7 @@ test_or_expression_for_labels test_shortest_paths test_text_search test_durability +test_load_parquet # NOTE: If the testing container is NOT restarted (each test having their own # container), all the auth test have to come after all tests that assume there diff --git a/smoke-release-testing/utils.bash b/smoke-release-testing/utils.bash index 1b8eb0809..b9c79e53a 100755 --- a/smoke-release-testing/utils.bash +++ b/smoke-release-testing/utils.bash @@ -47,6 +47,7 @@ check_dockerhub_images MEMGRAPH_GENERAL_FLAGS="--telemetry-enabled=false --log-level=TRACE --also-log-to-stderr" MEMGRAPH_ENTERPRISE_DOCKER_ENVS="-e MEMGRAPH_ENTERPRISE_LICENSE=$MEMGRAPH_ENTERPRISE_LICENSE -e MEMGRAPH_ORGANIZATION_NAME=$MEMGRAPH_ORGANIZATION_NAME" MEMGRAPH_DOCKER_MOUNT_VOLUME_FLAGS="-v mg_lib:/var/lib/memgraph" +MEMGRAPH_DOCKER_LOCAL_DATA_MOUNT_VOLUME_FLAGS="-v $SCRIPT_DIR/data:/data" MEMGRAPH_FULL_PROPERTIES_SET="{id:0, name:\"tester\", age:37, height:175.0, merried:true}" MEMGRAPH_PROPERTY_COMPRESSION_FLAGS="--storage-property-store-compression-enabled=true --storage-property-store-compression-level=mid" 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() { run_memgraph_last_dockerhub_container() { if [ ! "$(docker ps -q -f name=memgraph_last_data)" ]; then docker run -d --rm -p $MEMGRAPH_LAST_DATA_BOLT_PORT:7687 -p $MEMGRAPH_LAST_MONITORING_PORT:9091 \ + $MEMGRAPH_DOCKER_LOCAL_DATA_MOUNT_VOLUME_FLAGS \ --name memgraph_last_data \ $MEMGRAPH_LAST_DOCKERHUB_IMAGE $MEMGRAPH_GENERAL_FLAGS fi @@ -227,6 +229,7 @@ run_memgraph_last_dockerhub_container() { run_memgraph_next_dockerhub_container() { if [ ! "$(docker ps -q -f name=memgraph_next_data)" ]; then docker run -d --rm -p $MEMGRAPH_NEXT_DATA_BOLT_PORT:7687 -p $MEMGRAPH_NEXT_MONITORING_PORT:9091 \ + $MEMGRAPH_DOCKER_LOCAL_DATA_MOUNT_VOLUME_FLAGS \ --name memgraph_next_data \ $MEMGRAPH_ENTERPRISE_DOCKER_ENVS $MEMGRAPH_NEXT_DOCKERHUB_IMAGE $MEMGRAPH_GENERAL_FLAGS \ $MEMGRAPH_PROPERTY_COMPRESSION_FLAGS $MEMGRAPH_SHOW_SCHEMA_INFO_FLAG