| #!/bin/bash |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| set -e |
| |
| SDK=${1:-"all"} |
| FEATURE=${2:-"scenarios/basic_messaging.feature"} |
| |
| echo "๐งช Running BDD tests for SDK: $SDK" |
| echo "๐ Feature file: $FEATURE" |
| |
| # Change to BDD directory |
| cd "$(dirname "$0")/../bdd" |
| |
| case $SDK in |
| "rust") |
| echo "๐ฆ Running Rust BDD tests..." |
| docker compose build --no-cache iggy-server rust-bdd |
| docker compose up --abort-on-container-exit rust-bdd |
| ;; |
| "python") |
| echo "๐ Running Python BDD tests..." |
| docker compose build --no-cache iggy-server python-bdd |
| docker compose up --abort-on-container-exit python-bdd |
| ;; |
| "go") |
| echo "๐น Running Go BDD tests..." |
| docker compose build --no-cache iggy-server go-bdd |
| docker compose up --abort-on-container-exit go-bdd |
| ;; |
| "node") |
| echo "๐ข๐ Running node BDD tests..." |
| docker compose build --no-cache iggy-server node-bdd |
| docker compose up --abort-on-container-exit node-bdd |
| ;; |
| "all") |
| echo "๐ Running all SDK BDD tests..." |
| echo "๐ฆ Starting with Rust tests..." |
| docker compose build --no-cache iggy-server rust-bdd python-bdd go-bdd |
| docker compose up --abort-on-container-exit rust-bdd |
| echo "๐ Now running Python tests..." |
| docker compose up --abort-on-container-exit python-bdd |
| echo "๐น Now running Go tests..." |
| docker compose up --abort-on-container-exit go-bdd |
| echo "๐ข๐ Now unning node BDD tests..." |
| docker compose up --abort-on-container-exit node-bdd |
| ;; |
| "clean") |
| echo "๐งน Cleaning up Docker resources..." |
| docker compose down -v |
| docker compose rm -f |
| ;; |
| *) |
| echo "โ Unknown SDK: $SDK" |
| echo "๐ Usage: $0 [rust|python|go|all|clean] [feature_file]" |
| echo "๐ Examples:" |
| echo " $0 rust # Run Rust tests only" |
| echo " $0 python # Run Python tests only" |
| echo " $0 go # Run Go tests only" |
| echo " $0 node # Run Node.js tests only" |
| echo " $0 all # Run all SDK tests" |
| echo " $0 clean # Clean up Docker resources" |
| exit 1 |
| ;; |
| esac |
| |
| echo "โ
BDD tests completed for: $SDK" |