-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Roles tests against Role/Collection installed from Ansible Galaxy #75
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,8 +55,10 @@ function setup_conjur { | |
|
||
function run_test_cases { | ||
for test_case in test_cases/*; do | ||
teardown_and_setup | ||
run_test_case "$(basename -- "$test_case")" | ||
if [ "${test_case}" != "test_cases/common" ]; then | ||
teardown_and_setup | ||
run_test_case "$(basename -- "$test_case")" | ||
fi | ||
done | ||
} | ||
|
||
|
@@ -71,7 +73,7 @@ function run_test_case { | |
" | ||
docker exec "${ansible_cid}" bash -ec " | ||
cd tests | ||
py.test --junitxml=./junit/${test_case} --connection docker -v test_cases/${test_case}/tests/test_default.py | ||
py.test --junitxml=./junit/${test_case} --connection docker -v test_cases/common/test_default.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially my feedback was going to be. Let's add a comment up top to clarify why we avoid this folder, and a comment here to clarify that the common folder contains the code for the shared common test cases. Now I'm thinking that we should perhaps
|
||
" | ||
else | ||
echo ERROR: run_test called with no argument 1>&2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Configuring conjur identity on remote hosts from Role | ||
hosts: testapp | ||
roles: | ||
- role: cyberark.conjur-host-identity | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea how this is still working given the role name constraints ? |
||
conjur_account: cucumber | ||
conjur_appliance_url: "https://conjur-proxy-nginx" | ||
conjur_host_factory_token: "{{lookup('env', 'HFTOKEN')}}" | ||
conjur_host_name: "conjur_{{ ansible_hostname }}" | ||
conjur_ssl_certificate: "{{lookup('file', '../../conjur.pem')}}" | ||
conjur_validate_certs: yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so sure about this, some considerations...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For (1) I think if we want a smoke test to ensure that we can always install the role from galaxy then we should define that separate to the tests that currently exist.