1cfbdd627d
This is intended to address difficulties in setting up the existing Vagrant-based development environment, and provide a locally-runnable gate script. ./tools/gate.sh runs tests as specified by a JSON manifest. Valid manifests live in `tools/g2/manifests`. Currently, the following are supported: * full - Run an extensive suite. * genesis - Run only through Genesis. * quick - Run a small cluster test. * prepare - Run only the off-site preparation before Genesis -- useful for quick sanity testing. Change-Id: I4900d34437f9fe735f580ab91b38a6bb5424481e
24 lines
683 B
Bash
24 lines
683 B
Bash
validate_cluster() {
|
|
NAME=${1}
|
|
|
|
log Validating cluster via VM ${NAME}
|
|
rsync_cmd ${TEMP_DIR}/scripts/validate-cluster.sh ${NAME}:/root/promenade/
|
|
ssh_cmd ${NAME} /root/promenade/validate-cluster.sh
|
|
}
|
|
|
|
validate_etcd_membership() {
|
|
CLUSTER=${1}
|
|
VM=${2}
|
|
shift 2
|
|
EXPECTED_MEMBERS=${@}
|
|
|
|
log Validating ${CLUSTER} etcd membership via ${VM}
|
|
FOUND_MEMBERS=$(etcdctl_member_list ${CLUSTER} ${VM} | tr '\n' ' ' | sed 's/ $//')
|
|
|
|
if [[ "x${EXPECTED_MEMBERS}" != "x${FOUND_MEMBERS}" ]]; then
|
|
log Etcd membership check failed for cluster ${CLUSTER}
|
|
log Found \"${FOUND_MEMBERS}\", expected \"${EXPECTED_MEMBERS}\"
|
|
exit 1
|
|
fi
|
|
}
|