etcd/tools/functional-tester
Gyuho Lee 273dc355c1 functional-tester/tester: add random delay failure cases
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-05 11:22:38 -07:00
..
agent functional-tester/agent: use "proxy.Server" 2018-04-05 11:06:38 -07:00
cmd functional-tester/cmd/etcd-tester: add wait health logging 2018-04-01 02:33:10 -07:00
rpcpb functional-tester/rpcpb: add random delay network failure cases 2018-04-05 11:18:17 -07:00
runner functional-tester: move "etcd-runner" to "./cmd" 2018-03-30 11:25:23 -07:00
scripts functional-tester: update local test scripts with docker 2018-03-30 11:25:33 -07:00
tester functional-tester/tester: add random delay failure cases 2018-04-05 11:22:38 -07:00
README.md functional-tester: update README 2018-04-02 11:02:44 -07:00
build functional-tester: update build paths 2018-03-30 11:25:23 -07:00

README.md

etcd functional test suite

etcd functional test suite tests the functionality of an etcd cluster with a focus on failure resistance under high pressure. It sets up an etcd cluster and inject failures into the cluster by killing the process or isolate the network of the process. It expects the etcd cluster to recover within a short amount of time after fixing the fault.

etcd functional test suite has two components: etcd-agent and etcd-tester. etcd-agent runs on every test machines and etcd-tester is a single controller of the test. etcd-tester controls all the etcd-agent to start etcd clusters and simulate various failure cases.

Requirements

The environment of the cluster must be stable enough, so etcd test suite can assume that most of the failures are generated by itself.

etcd agent

etcd agent is a daemon on each machines. It can start, stop, restart, isolate and terminate an etcd process. The agent exposes these functionality via HTTP RPC.

etcd tester

etcd functional tester control the progress of the functional tests. It calls the RPC of the etcd agent to simulate various test cases. For example, it can start a three members cluster by sending three start RPC calls to three different etcd agents. It can make one of the member failed by sending stop RPC call to one etcd agent.

Run locally

PASSES=functional ./test

Run with Docker

To run locally, first build tester image:

pushd ../..
make build-docker-functional-tester
popd

And run example scripts.

# run 3 agents for 3-node local etcd cluster
./scripts/docker-local-agent.sh 1
./scripts/docker-local-agent.sh 2
./scripts/docker-local-agent.sh 3

# to run only 1 tester round
./scripts/docker-local-tester.sh