Add dependency check for e2e tests (#1240)

This commit is contained in:
Josipmrden 2023-09-12 17:34:08 +02:00 committed by GitHub
parent 79a3c5af8e
commit 440838c0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -229,6 +229,11 @@ jobs:
# branches and tags. (default: 1)
fetch-depth: 0
- name: Check e2e service dependencies
run: |
cd tests/e2e
./dependency_check.sh
- name: Build release binaries
run: |
# Activate toolchain.

14
tests/e2e/dependency_check.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
check_service_in_use() {
if docker ps --format "{{.Names}}" | grep -q "$1"; then
echo "$2 is successfully working"
else
echo "$2 needs to be available"
exit 1
fi
}
check_service_in_use "kafka" "Kafka service"
check_service_in_use "pulsar" "Pulsar service"