Skip to content

Commit

Permalink
Merge pull request linux-system-roles#14 from richm/fix-test-pass-tem…
Browse files Browse the repository at this point in the history
…p-key

fix temp pass key test
  • Loading branch information
richm authored Aug 4, 2020
2 parents 4020978 + 4fbd4ca commit 305cd5a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/tasks/cleanup_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
state: absent
delegate_to: localhost

- name: Clean up dummy key file on managed host
file:
path: "{{ nbde_client_test_key_file }}"
state: absent

# vim:set ts=2 sw=2 et:
7 changes: 7 additions & 0 deletions tests/tests_passphrase_temporary_keyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@
- not nbde_client_unlock.failed
- not nbde_client_close.failed

- name: copy the key file to the managed host
copy:
src: "{{ nbde_client_test_key_file }}"
dest: "{{ nbde_client_test_key_file }}"

- name: Attempt to check whether default key file works
include_tasks: tasks/verify_default_key_file.yml

- name: Make sure the default key file did not work
assert:
that:
- nbde_client_key_file is not success
- nbde_client_key_file.stderr ==
"No key available with this passphrase."

- name: Assert idempotency
include_tasks: tasks/verify_idempotency.yml
Expand Down

0 comments on commit 305cd5a

Please sign in to comment.