mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
add probe
This commit is contained in:
3
.github/workflows/e2e.yml
vendored
3
.github/workflows/e2e.yml
vendored
@@ -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
|
||||
|
||||
|
||||
8
Makefile
8
Makefile
@@ -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
12
scripts/probe.sh
Normal 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
|
||||
Reference in New Issue
Block a user