add probe

This commit is contained in:
JimChenWYU
2024-09-24 15:00:59 +08:00
parent d0f52a2b78
commit ed85e4e24c
3 changed files with 20 additions and 3 deletions

View File

@@ -73,7 +73,8 @@ jobs:
- name: run fs
working-directory: .
run: |
make e2e-server &
make e2e-server > /dev/null &
make probe-e2e
env:
PORT: 9000

View File

@@ -22,6 +22,10 @@ start:
stop:
$(DOCKER_CLI) stop $(CONTAINER_NAME)
.PHONY: e2e
.PHONY: e2e-server
e2e-server:
sh $(shell pwd)/scripts/run.sh
sh $(shell pwd)/scripts/run.sh
.PHONY: probe-e2e
probe-e2e:
sh $(shell pwd)/scripts/probe.sh

12
scripts/probe.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
IP=127.0.0.1
PORT=9000
while true; do
nc -zv ${IP} ${PORT}
if [[ "$?" == "0" ]]; then
exit 0
fi
sleep 2
done