Commit 64db2f21 by Feanil Patel

Generate edxapp config files for testing.

parent 913df64a
......@@ -38,6 +38,7 @@ script:
popd
- |
set -e
ROOT_DIR=$PWD
cd playbooks/edx-east
ROLE_DIRS=$(/bin/ls -d roles/*)
cat <<EOF >travis-test.yml
......@@ -51,3 +52,11 @@ script:
ansible-playbook -i localhost, --syntax-check travis-test.yml
output_dir="$PWD/test_output/env-dep"
mkdir -p $output_dir
ansible-playbook -i localhost, -c local --tags edxapp_cfg edxapp.yml -e edxapp_user=`whoami` -e edxapp_app_dir=$output_dir -e edxapp_code_dir=$output_dir -e EDXAPP_CFG_DIR=$output_dir
root_dir=$output_dir
environment_deployments="."
source $ROOT_DIR/tests/validate_templates.sh
#!/usr/bin/env bash
# This file should be sourced
# The 'root_dir' and 'environment_deployments' variables
# should be set when we source this.
for e_d in $environment_deployments
do
GREP_DIR="$root_dir/${e_d}"
if ! egrep -q -r --include *.json '{{' "${GREP_DIR}"; then
echo "No un-expanded vars in ${e_d}"
else
echo "Found un-expanded vars in ${e_d}"
echo `egrep -r --include *.json '{{' "${GREP_DIR}"`
FAIL=1
fi
if ! egrep -qi -r --include *.json \'"False"\' "${GREP_DIR}"; then
echo "No quoted False."
else
echo "Found a quoted boolean in ${e_d}"
echo `egrep -qi -r --include *.json "False" "${GREP_DIR}"`
FAIL=1
fi
if ! egrep -qi -r --include *.json '\"True\"' "${GREP_DIR}"; then
echo "No quoted False."
else
echo "Found a quoted boolean in ${e_d}"
echo `egrep -qi -r --include *.json '\"True\"' "${GREP_DIR}"`
FAIL=1
fi
done
if [ "$FAIL" -eq 1 ] ; then
echo "Failing..."
exit 1
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment