interop/tools/consistency.sh
Chris Hoge a5953d4a09 Add tool and tests to check guideline against test suite
This tool checks a guideline against a Tempest test suite
to make sure that:
    * all idempotent IDs in the guideline exist in the tests
    * test names in the test suite match names in the guideline

By gating against this tool in both the Interop project and in
Tempest, we can help prevent typos and catch renaming of tests.

Change-Id: I8b6778c2063eeac8b0d7c0d64127eefe420c617f
2018-08-24 11:11:40 -07:00

20 lines
439 B
Bash
Executable File

#!/bin/bash
tempestdir=$(mktemp -d)
echo $tempestdir
git clone git://git.openstack.org/openstack/tempest $tempestdir
PYTHONPATH=$tempestdir python ./tools/checktests.py --guideline next.json
exit_1=$?
PYTHONPATH=$tempestdir python ./tools/checktests.py --guideline 2018.02.json
exit_2=$?
PYTHONPATH=$tempestdir python ./tools/checktests.py --guideline 2017.09.json
exit_3=$?
rm -rf $tempestdir
! (( $exit_1 || $exit_2 || $exit_3 ))