mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Enable integration tests for the crypto/ namespace (#26684)
Crypto namespace contains the openssl modules. It has no integration testing as of now. This commits aims to add integration tests for the crypto namespace. This will make it easier to spot breaking changes in the future. This tests currently apply to: * openssl_privatekey * openssl_publickey * openssl_csr
This commit is contained in:
parent
b3e8fa72ce
commit
8b22c45a45
20 changed files with 152 additions and 14 deletions
|
@ -0,0 +1,28 @@
|
|||
- name: Validate privatekey1 (test)
|
||||
shell: "openssl rsa -noout -text -in {{ output_dir }}/privatekey1.pem | grep Private | sed 's/Private-Key: (\\(.*\\) bit)/\\1/'"
|
||||
register: privatekey1
|
||||
|
||||
- name: Validate privatekey1 (assert)
|
||||
assert:
|
||||
that:
|
||||
- privatekey1.stdout == '4096'
|
||||
|
||||
|
||||
- name: Validate privatekey2 (test)
|
||||
shell: "openssl rsa -noout -text -in {{ output_dir }}/privatekey2.pem | grep Private | sed 's/Private-Key: (\\(.*\\) bit)/\\1/'"
|
||||
register: privatekey2
|
||||
|
||||
- name: Validate privatekey2 (assert)
|
||||
assert:
|
||||
that:
|
||||
- privatekey2.stdout == '2048'
|
||||
|
||||
|
||||
- name: Validate privatekey3 (test)
|
||||
shell: "openssl dsa -noout -text -in {{ output_dir }}/privatekey3.pem | grep Private | sed 's/Private-Key: (\\(.*\\) bit)/\\1/'"
|
||||
register: privatekey3
|
||||
|
||||
- name: Validate privatekey3 (assert)
|
||||
assert:
|
||||
that:
|
||||
- privatekey1.stdout == '4096'
|
Loading…
Add table
Add a link
Reference in a new issue