Skip to content

Commit

Permalink
script
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Dec 27, 2024
1 parent 995ccc1 commit f9f7e33
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions scripts/kafka-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,21 @@
set -euf -o pipefail

compose_file=""
jaeger_version=""
kafka_version=""
jaeger_version="v2"
kafka_version="v3"
manage_kafka="true"
success="false"

usage() {
echo "Usage: $0 [-K] -j <jaeger_version> -v <kafka_version>"
echo " -K: do not start or stop Kafka container (useful for local testing)"
echo " -j: major version of Jaeger to test (v1|v2)"
echo " -v: kafka major version (3.x|2.x)"
echo "Usage: $0 [-S] [-j <jaeger_version>] [-v <kafka_version>]"
echo " -S: 'no storage' - do not start or stop Kafka container (useful for local testing)"
echo " -j: major version of Jaeger to test (v1|v2); default: v2"
echo " -v: kafka major version (3.x); default: 3.x"
exit 1
}

check_arg() {
if [ ! $# -eq 3 ]; then
echo "ERROR: need exactly three arguments"
usage
fi
}

parse_args() {
while getopts "j:v:Kh" opt; do
while getopts "j:v:Sh" opt; do
case "${opt}" in
j)
jaeger_version=${OPTARG}
Expand All @@ -46,7 +39,7 @@ parse_args() {
;;
esac
;;
K)
S)
manage_kafka="false"
;;
*)
Expand All @@ -61,7 +54,6 @@ parse_args() {
compose_file="docker-compose/kafka/${kafka_version}/docker-compose.yml"
}


setup_kafka() {
echo "Starting Kafka using Docker Compose..."
docker compose -f "${compose_file}" up -d kafka
Expand Down

0 comments on commit f9f7e33

Please sign in to comment.