Skip to content

Commit 74debf9

Browse files
committed
Testing: running Feature-verification-tests with the test operator AnsibleTest
1 parent 8fd2e2e commit 74debf9

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

container-images/tcib/base/ansible-tests/run_ansible.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ if [[ ${POD_DEBUG:-true} == true ]]; then
1515
fi
1616

1717
# Clone the Ansible repository
18-
git clone "$POD_ANSIBLE_GIT_REPO" "$ANSIBLE_DIR"
18+
#git clone "$POD_ANSIBLE_GIT_REPO" "$ANSIBLE_DIR"
19+
# This should be passed in via the appropriate vars
20+
git clone "http://github.com/infrawatch/feature-verificaton-tests" "$ANSIBLE_DIR"
1921

2022
# Handle extra vars file if provided
2123
if [[ -n "${POD_ANSIBLE_FILE_EXTRA_VARS:-}" ]]; then
@@ -40,6 +42,21 @@ else
4042
echo "requirements.yaml doesn't exist, skipping requirements installation"
4143
fi
4244

45+
# Can I add a special config file here? Or arbitrary config vars?
46+
# Q: Can I pass a config file by path?
4347
# Navigate to ansible directory and run playbook
48+
# ANSIBLE_CONFIG can be passed
49+
# This is only needed if I cannot specify which directory to execute from
50+
# IF the ansible runner is always using custom_junit plugin, then having a test-class var passed in will do no harm.
51+
# The ansible.config would just need to change the classname.
52+
# OR we might need to look into passing a config file content into the runner.
4453
cd "$ANSIBLE_DIR"
54+
export $ANSIBLE_CONFIG="$ANSIBLE_DIR/feature-verification-tests/ci/ansible.cfg"
55+
# this should be passed in with the appropriate vars.
56+
export POD_ANSIBLE_PLAYBOOK=$ANSIBLE_DIR/feature-verification-tests/ci/run_verify_metrics_osp18.yml
57+
4558
ansible-playbook "$POD_ANSIBLE_PLAYBOOK" $ANSIBLE_DEBUG -i $ANSIBLE_DIR/inventory $POD_ANSIBLE_EXTRA_VARS $ANSIBLE_FILE_EXTRA_VARS_PARAM
59+
# anything that is run by FVT is always going to pass, since it relies on report_results to run afterwards, so I will need to add a new playbook to do the tests and the reporting.
60+
# Currently, the report-results has to be separate since the custom junit plugin will only create the XML files once the playbook is completed.
61+
# After FVT tests are run, there still needs to be a separate hook to check the results (including fetching the results from the pod)
62+
# or else there needs to be some mechanism here to check the results.

0 commit comments

Comments
 (0)