forked from grafana-cold-storage/metrictank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathend2end_test.sh
More file actions
executable file
·32 lines (23 loc) · 1000 Bytes
/
Copy pathend2end_test.sh
File metadata and controls
executable file
·32 lines (23 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
set -x # debugging
DOCKER_COMPOSE_VERSION="1.8.1"
DOCKER_COMPOSE_EXEC="/tmp/docker-compose"
DOCKER_COMPOSE_FILE="docker/docker-dev/docker-compose.yml"
# this is only necessary until Circle CI updates their images to provide a recent version
curl -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-Linux-x86_64" > $DOCKER_COMPOSE_EXEC
chmod +x $DOCKER_COMPOSE_EXEC
# start all docker containers
$DOCKER_COMPOSE_EXEC -f $DOCKER_COMPOSE_FILE up -d
# wait for carbon input before sending data
export WAIT_HOSTS="127.0.0.1:2003"
export WAIT_TIMEOUT=120
export METRICS_PER_SECOND=1000
scripts/wait_for_endpoint.sh scripts/generate_test_data.sh start
# give fakemetrics some warmup time
sleep 30
# verify the metrics have arrived in graphite and keep exit status
scripts/verify_metrics_received.py 127.0.0.1 8080 10 $METRICS_PER_SECOND
RESULT=$?
scripts/generate_test_data.sh stop
$DOCKER_COMPOSE_EXEC -f $DOCKER_COMPOSE_FILE down
exit $RESULT