Test STIG separately and with no output if all tests pass
This commit is contained in:
parent
42d5bc9321
commit
0e47f66928
|
@ -61,6 +61,9 @@ function test_app_function_type {
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_app_functions {
|
function test_app_functions {
|
||||||
|
if [ $RUN_STIG ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||||
|
|
||||||
# check that these functions exist
|
# check that these functions exist
|
||||||
|
@ -78,6 +81,10 @@ function test_app_functions {
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_unique_onion_ports {
|
function test_unique_onion_ports {
|
||||||
|
if [ $RUN_STIG ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# test that some services are not assigned the same onion port
|
# test that some services are not assigned the same onion port
|
||||||
FILES=src/${PROJECT_NAME}-app-*
|
FILES=src/${PROJECT_NAME}-app-*
|
||||||
ports=$(grep -r "_ONION_PORT=" $FILES | awk -F ':' '{print $2}' | uniq | awk -F '=' '{print $2}')
|
ports=$(grep -r "_ONION_PORT=" $FILES | awk -F ':' '{print $2}' | uniq | awk -F '=' '{print $2}')
|
||||||
|
@ -1093,12 +1100,14 @@ function test_stig {
|
||||||
output "V-58901" $? ${SETLANG}
|
output "V-58901" $? ${SETLANG}
|
||||||
################
|
################
|
||||||
|
|
||||||
|
if [ $FAILS -gt 0 ]; then
|
||||||
echo ''
|
echo ''
|
||||||
echo "Passes: $PASSES"
|
echo "Passes: $PASSES"
|
||||||
echo "Fails: $FAILS"
|
echo "Fails: $FAILS"
|
||||||
if [ $FAILS -gt 0 ]; then
|
if [ $FAILS -gt 0 ]; then
|
||||||
exit 792353
|
exit 792353
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
while [[ $# > 1 ]]
|
while [[ $# > 1 ]]
|
||||||
|
|
Loading…
Reference in New Issue