diff --git a/tools/functional-tester/README.md b/tools/functional-tester/README.md index 4c4ccdb20..c562d3dd7 100644 --- a/tools/functional-tester/README.md +++ b/tools/functional-tester/README.md @@ -4,7 +4,7 @@ etcd functional test suite tests the functionality of an etcd cluster with a foc 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 +## 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. @@ -18,8 +18,8 @@ etcd functional tester control the progress of the functional tests. It calls th ### Run locally -``` -$ PASSES=functional ./test +```bash +PASSES=functional ./test ``` ### Run with Docker @@ -29,8 +29,7 @@ To run locally, first build tester image: ```bash pushd ../.. -GO_VERSION=1.9.3 \ - make build-docker-functional-tester \ +make build-docker-functional-tester \ -f ./hack/scripts-dev/Makefile popd @@ -39,9 +38,20 @@ popd And run [example scripts](./scripts). ```bash -./scripts/agent-1.sh -./scripts/agent-2.sh -./scripts/agent-3.sh +# 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 -./scripts/tester-limit.sh +# to run only 1 tester round +LIMIT=1 ./scripts/docker-local-tester.sh + +# to run long-running tests with no limit +LIMIT=1 ./scripts/docker-local-tester.sh + +# to run only 1 tester round with election runner and others +# default is STRESSER="keys,lease" +LIMIT=1 \ + STRESSER="keys,lease,election-runner,watch-runner,lock-racer-runner,lease-runner" \ + ./scripts/docker-local-tester.sh ``` diff --git a/tools/functional-tester/scripts/agent-1.sh b/tools/functional-tester/scripts/agent-1.sh deleted file mode 100755 index 5f4bb44fb..000000000 --- a/tools/functional-tester/scripts/agent-1.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -<