Gyuho Lee 290fa0c1be *: sync "functional-tester" from 3.2 branch | il y a 6 ans | |
---|---|---|
.. | ||
docker | il y a 9 ans | |
etcd-agent | il y a 6 ans | |
etcd-tester | il y a 6 ans | |
Procfile | il y a 8 ans | |
README.md | il y a 6 ans | |
build | il y a 8 ans | |
test | il y a 9 ans |
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.
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 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 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.
To run the functional tests using Docker, the provided script can be used to set up an environment using Docker Compose.
Script (on linux):
./tools/functional-tester/test
Running the script requires:
Notes:
rm bin/etcd;GOOS=linux GOARCH=amd64 ./tools/functional-tester/test
) otherwise it will return exec format error
To run the functional tests on a single machine using Goreman, build with the provided build script and run with the provided Procfile:
./tools/functional-tester/build
goreman -f tools/functional-tester/Procfile start
Notes: