Skip to content

Commit

Permalink
fix ansible include_tasks and fix tests (#5)
Browse files Browse the repository at this point in the history
* fix deprecated variable passing: ansible/ansible#32812

* wait longer for CQ to run

* add show continuous queries

* increase wait for CQ again (to be sure)

* speed up test (reduce CQ interval and test wait)

* increase wait time again

* debug telegraf input

* add more debug

* run telegraf priviledged

* logs influxdb
  • Loading branch information
DrPsychick authored Nov 3, 2018
1 parent 9894915 commit fec18aa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ before_install:

install:
# start influxdb (will take some time to be reachable!)
- docker run -d --name influxdb -p 8086:8086 -v $PWD/integration/influxdb:/var/lib/influxdb influxdb:alpine
- rm -rf $PWD/integration/influxdb/*
- docker run --rm -d --name influxdb -p 8086:8086 -v $PWD/integration/influxdb:/var/lib/influxdb influxdb:alpine

# start telegraf to continuously write data to influxdb
- >
if [ "$TEST" = "setup" -o "$TEST" = "compact" ]; then
docker run -d --net host --name telegraf telegraf:alpine; sleep 10;
docker run --rm -d --net host --privileged --name telegraf telegraf:alpine;
sleep 10;
docker logs telegraf;
fi
# Install ansible and jq.
Expand Down Expand Up @@ -135,10 +138,14 @@ after_script:
- curl http://localhost:8086/query?db=$db_name --data-urlencode "q=SHOW RETENTION POLICIES";
- curl http://localhost:8086/query?db=$db_name --data-urlencode "q=SHOW CONTINUOUS QUERIES";
- curl http://localhost:8086/query?db=$db_name --data-urlencode "q=SHOW MEASUREMENTS";
- docker logs telegraf;
- docker logs influxdb;
- >
if [ "$TEST" = "setup" ]; then
curl http://localhost:8086/query?db=$db_name --data-urlencode
"q=SELECT usage_user FROM $db_name.$rp_name.cpu" | jq .;
curl http://localhost:8086/query?db=telegraf --data-urlencode
"q=SELECT usage_user FROM telegraf.rp_7d.cpu" | jq .;
fi
- >
if [ "$TEST" = "migrate" ]; then
Expand Down

0 comments on commit fec18aa

Please sign in to comment.