| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 5 | # shellcheck disable=SC1091 |
| 6 | . "$SCRIPT_DIR/lib.sh" |
| 7 | |
| 8 | init_workspace "redis" |
| 9 | trap cleanup EXIT |
| 10 | |
| 11 | REDIS_PORT="$(reserve_port)" |
| 12 | write_env "REDIS_PORT" "$REDIS_PORT" |
| 13 | replace_in_file "$WORKDIR/config/go.d/redis.conf" "127.0.0.1:6379" "127.0.0.1:${REDIS_PORT}" |
| 14 | |
| 15 | compose_up redis |
| 16 | wait_healthy redis 60 |
| 17 | compose_run redis-init |
| 18 | |
| 19 | build_plugin |
| 20 | run_info redis |
| 21 | run_top_queries redis |
| 22 | |
| 23 | echo "E2E checks passed for redis." >&2 |