1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 12:45:57 +01:00
Files
atomic/tests/integration/test_help.sh
Jonathan Lebon d04d3aa454 test_help.sh: check for groff before testing
Atomic Host variants do not have groff (and most likely never will since
it would pull in a lot of Perl packages). Print out a nicer error if
we're on AH, and make sure to skip that test.

Closes: #684
Approved by: cgwalters
2016-10-13 16:37:01 +00:00

35 lines
946 B
Bash
Executable File

#!/bin/bash -x
set -euo pipefail
IFS=$'\n\t'
# Test scripts run with PWD=tests/..
# The test harness exports some variables into the environment during
# testing: PYTHONPATH (python module import path
# WORK_DIR (a directory that is safe to modify)
# DOCKER (the docker executable location)
# ATOMIC (an invocation of 'atomic' which measures code coverage)
# SECRET (a generated sha256 hash inserted into test containers)
# In addition, the test harness creates some images for use in testing.
# See tests/test-images/
OUTPUT=$(/bin/true)
# Test standard help in man format
if [ -x /usr/bin/groff ]; then
${ATOMIC} help atomic-test-1 1>/dev/null
fi
# Test override label
${ATOMIC} help atomic-test-3 1>/dev/null
rc=0
${ATOMIC} help centos:latest 1>/dev/null || rc=$?
if [[ ${rc} != 1 ]]; then
# Test failed
echo "This test should result in a return code of 1"
exit 1
fi