Files
gost/tests/e2e/testdata/probe/recovery.yaml
T
ginuerzh c7d793c619 e2e: add cmd probe recovery test (gost#837)
Verifies dead->alive->dead node transition: a node excluded by a failing cmd
probe resumes carrying traffic once the probe flips healthy, without restart.
2026-08-01 23:23:28 +08:00

53 lines
1.1 KiB
YAML

services:
- name: proxy
addr: :8080
handler:
type: http
chain: my-chain
listener:
type: tcp
# Two live relays — both forward to the echo server. Relays never go down;
# liveness is driven solely by the cmd probes reading flag files in the
# container, so the test can flip node health without restarting anything.
- name: relay-a
addr: 127.0.0.1:18081
handler:
type: http
listener:
type: tcp
- name: relay-b
addr: 127.0.0.1:18082
handler:
type: http
listener:
type: tcp
chains:
- name: my-chain
hops:
- name: hop-1
selector:
strategy: lowestlatency
maxFails: 1
failTimeout: 10s
nodes:
- name: node-a
addr: 127.0.0.1:18081
connector:
type: http
probe:
# exits 1 while /tmp/a_down exists → node marked dead by probe.
type: cmd
command: "test -f /tmp/a_down && exit 1 || exit 0"
interval: 2s
- name: node-b
addr: 127.0.0.1:18082
connector:
type: http
probe:
type: cmd
command: "test -f /tmp/b_down && exit 1 || exit 0"
interval: 2s