Move to Jepsen 0.3.0 and fix vars

This commit is contained in:
Josip Mrden 2023-04-23 13:56:36 +02:00
parent 74bc5237db
commit f8de1f05e7

View File

@ -6,7 +6,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MEMGRAPH_BINARY_PATH="../../build/memgraph"
# NOTE: On Ubuntu 22.04 0.3.2 uses non-existing docker compose --compatibility flag.
# NOTE: On Ubuntu 22.04 0.3.1 seems to be working.
JEPSEN_VERSION="${JEPSEN_VERSION:-0.2.5}"
JEPSEN_VERSION="${JEPSEN_VERSION:-0.3.0}"
JEPSEN_ACTIVE_NODES_NO=5
CONTROL_LEIN_RUN_ARGS="test-all --node-configs resources/node-config.edn"
CONTROL_LEIN_RUN_STDOUT_LOGS=1
@ -15,9 +15,9 @@ PRINT_CONTEXT() {
echo -e "MEMGRAPH_BINARY_PATH:\t\t $MEMGRAPH_BINARY_PATH"
echo -e "JEPSEN_VERSION:\t\t\t $JEPSEN_VERSION"
echo -e "JEPSEN_ACTIVE_NODES_NO:\t\t $JEPSEN_ACTIVE_NODES_NO"
echo -e "CONTROL_LEIN_RUN_ARGS:\t\t $JEPSEN_VERSION"
echo -e "CONTROL_LEIN_RUN_STDOUT_LOGS:\t $JEPSEN_VERSION"
echo -e "CONTROL_LEIN_RUN_STDERR_LOGS:\t $JEPSEN_VERSION"
echo -e "CONTROL_LEIN_RUN_ARGS:\t\t $CONTROL_LEIN_RUN_ARGS"
echo -e "CONTROL_LEIN_RUN_STDOUT_LOGS:\t $CONTROL_LEIN_RUN_STDOUT_LOGS"
echo -e "CONTROL_LEIN_RUN_STDERR_LOGS:\t $CONTROL_LEIN_RUN_STDERR_LOGS"
}
HELP_EXIT() {
@ -46,6 +46,7 @@ if ! command -v docker > /dev/null 2>&1 || ! command -v docker-compose > /dev/nu
exit 1
fi
PRINT_CONTEXT
exit 1
if [ ! -d "$script_dir/jepsen" ]; then
git clone https://github.com/jepsen-io/jepsen.git -b "$JEPSEN_VERSION" "$script_dir/jepsen"
@ -124,6 +125,7 @@ case $1 in
docker cp "$binary_path" "$jepsen_node_name":/opt/memgraph/"$binary_name"
# TODO(gitbuda): This doesn't work if the pure binary is linked called memgraph
docker exec "$jepsen_node_name" bash -c "rm -f /opt/memgraph/memgraph && ln -s /opt/memgraph/$binary_name /opt/memgraph/memgraph"
docker exec "$jepsen_node_name" bash -c "touch /opt/memgraph/memgraph.log
INFO "Copying $binary_name to $jepsen_node_name DONE."
done