functional-tester/

directory
v3.0.0-beta.0.0...-336e4f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2016 License: Apache-2.0

README

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.

with Docker (optionally)

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:

  • Docker 1.9+ (with networking support) - to create isolated network
  • docker-compose - to create etcd cluster and tester
  • A multi-arch Go toolchain (OSX)

Notes:

  • Docker image is based on Alpine Linux OS running in privileged mode to allow iptables manipulation.
  • To specify testing parameters (etcd-tester arguments) modify tools/functional-tester/docker/docker-compose.yml or start etcd-tester manually
  • (OSX) make sure that etcd binary is built for linux/amd64 (eg. rm bin/etcd;GOOS=linux GOARCH=amd64 ./tools/functional-tester/test) otherwise you get exec format error

Directories

Path Synopsis
etcd-agent is a daemon for controlling an etcd process via HTTP RPC.
etcd-agent is a daemon for controlling an etcd process via HTTP RPC.
client
Package client provides a client implementation to control an etcd-agent.
Package client provides a client implementation to control an etcd-agent.
etcd-runner is a program for testing etcd clientv3 features against a fault injected cluster.
etcd-runner is a program for testing etcd clientv3 features against a fault injected cluster.
etcd-tester is a single controller for all etcd-agents to manage an etcd cluster and simulate failures.
etcd-tester is a single controller for all etcd-agents to manage an etcd cluster and simulate failures.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL