mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-15 12:27:38 +00:00
test(java_cert): add idempotency test for pkcs12 import with password
Exercises _export_public_cert_from_pkcs12 when the alias already exists, verifying the password is correctly read from stdin on the comparison path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
683412e766
commit
eb1ed6998d
1 changed files with 17 additions and 0 deletions
|
|
@ -32,6 +32,23 @@
|
|||
that:
|
||||
- result_success is successful
|
||||
|
||||
- name: import pkcs12 again to verify idempotency (tests password via stdin in _export_public_cert_from_pkcs12)
|
||||
community.general.java_cert:
|
||||
pkcs12_path: "{{ remote_tmp_dir }}/{{ test_pkcs12_path }}"
|
||||
pkcs12_password: changeit
|
||||
pkcs12_alias: default
|
||||
cert_alias: default
|
||||
keystore_path: "{{ remote_tmp_dir }}/{{ test_keystore_path }}"
|
||||
keystore_pass: changeme_keystore
|
||||
keystore_create: true
|
||||
state: present
|
||||
register: result_idempotent
|
||||
|
||||
- name: verify idempotency
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result_idempotent is not changed
|
||||
|
||||
- name: import pkcs12 without alias params
|
||||
community.general.java_cert:
|
||||
pkcs12_path: "{{ remote_tmp_dir }}/{{ test_pkcs12_path }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue