ansible/test/integration/targets/set_stats/runme.sh
David Shrewsbury 5e55af2f02
[test coverage] Add tests for set_stats (#74243)
* satisfy the all-knowing, ever present God of Sanity and use 'grep -c' vs. 'wc -l'
2021-04-13 11:43:53 -04:00

13 lines
322 B
Bash
Executable file

#!/usr/bin/env bash
set -eux
export ANSIBLE_SHOW_CUSTOM_STATS=yes
# Simple tests
ansible-playbook test_simple.yml
# This playbook does two set_stats calls setting my_int to 10 and 15.
# The aggregated output should add to 25.
output=$(ansible-playbook test_aggregate.yml | grep -c '"my_int": 25')
test "$output" -eq 1