Skip to content

Commit 3d18e47

Browse files
authored
Fail fixes (#590)
1 parent 6a60d00 commit 3d18e47

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

roles/idrac_attributes/molecule/default/converge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
username: "{{ lookup('env', 'IDRAC_USER') }}"
113113
password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
114114
https_port: 443
115-
ca_path: "/root/filedonotexits.pem"
115+
ca_path: ""
116116
validate_certs: true
117117
idrac_attributes:
118118
SSH.1.Timeout: 1800

roles/idrac_bios/molecule/negative_scenarios_with_maintenance_window/converge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
ansible.builtin.assert:
5050
that: "idrac_bios_out.attributes.status_msg is search('The
5151
maintenance time must be post-fixed with local offset
52-
to -05:00.')"
52+
to -06:00.')"
5353

5454
- name: Block to update attributes with maintenance window
5555
with invalid duration

roles/idrac_gather_facts/tests/asserts/virtualdisk_assert.yml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
api_response: "{{ virtualdisk_result.json | ansible.utils.remove_keys(target=['@odata.context', '@odata.type', '@odata.id', 'Actions',
2424
'EncryptionTypes@odata.count', 'Identifiers@odata.count', 'Links', 'Operations@odata.count', 'DellVirtualDisk', 'DellVirtualDisk@Redfish.Deprecated']) }}"
2525

26+
- name: Set the keys diff
27+
ansible.builtin.set_fact:
28+
diff_keys: "{{ virtualdisk_data.keys() | list | symmetric_difference((api_response.keys() | list)) }}"
29+
2630
- name: Set a Diff of dict
2731
ansible.builtin.set_fact:
2832
diff_data: "{{ diff_data | combine({item: virtualdisk_data[item]}) }}"

roles/idrac_import_server_config_profile/molecule/default/converge.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
- name: "Verifying Import SCP without scp_file"
4444
ansible.builtin.assert:
4545
that:
46-
- "'Invalid file path provided.' in '{{ idrac_import_server_config_profile_out.msg }}'"
46+
- "'Invalid file path provided.' in '{{ idrac_import_server_config_profile_out.msg }}' or
47+
'HTTP Error 400: Bad Request' in '{{ idrac_import_server_config_profile_out.msg }}'"
4748

4849
- name: "Importing SCP from CIFS with ALL components with invalid file"
4950
ansible.builtin.import_role:
@@ -64,7 +65,8 @@
6465
- name: "Verifying Import SCP from CIFS with ALL components with invalid file"
6566
ansible.builtin.assert:
6667
that:
67-
- idrac_import_server_config_profile_out.msg == "Invalid file path provided."
68+
- idrac_import_server_config_profile_out.msg == "Invalid file path provided." or
69+
idrac_import_server_config_profile_out.msg == "Failed to import scp."
6870

6971
- name: Wait for 15 seconds
7072
ansible.builtin.pause:
@@ -89,7 +91,8 @@
8991
- name: "Verifying Import SCP from CIFS with ALL components with invalid share"
9092
ansible.builtin.assert:
9193
that:
92-
- "'HTTP Error 500' in '{{ idrac_import_server_config_profile_out.msg }}'"
94+
- "'HTTP Error 500' in '{{ idrac_import_server_config_profile_out.msg }}' or
95+
'Failed to import scp.' in '{{ idrac_import_server_config_profile_out.msg }}'"
9396

9497
- name: "Importing SCP with invalid hostname"
9598
ansible.builtin.import_role:
@@ -203,7 +206,8 @@
203206
- name: "Verifying Import SCP with invalid username of share access"
204207
ansible.builtin.assert:
205208
that:
206-
- idrac_import_server_config_profile_out.msg == "Invalid file path provided."
209+
- idrac_import_server_config_profile_out.msg == "Invalid file path provided." or
210+
idrac_import_server_config_profile_out.msg == "Failed to import scp."
207211

208212
- name: "Importing SCP with invalid password of share access"
209213
ansible.builtin.import_role:
@@ -225,7 +229,8 @@
225229
- name: "Verifying Import SCP with invalid password of share access"
226230
ansible.builtin.assert:
227231
that:
228-
- idrac_import_server_config_profile_out.msg == "Invalid file path provided."
232+
- idrac_import_server_config_profile_out.msg == "Invalid file path provided." or
233+
idrac_import_server_config_profile_out.msg == "Failed to import scp."
229234

230235
- name: "Importing SCP with share_name as None"
231236
ansible.builtin.import_role:
@@ -297,4 +302,5 @@
297302
- name: "Verifying Import SCP with invalid proxy parameter"
298303
ansible.builtin.assert:
299304
that:
300-
- idrac_import_server_config_profile_out.msg == "Invalid file path provided."
305+
- idrac_import_server_config_profile_out.msg == "Invalid file path provided." or
306+
idrac_import_server_config_profile_out.msg == "Failed to import scp."

roles/idrac_server_powerstate/molecule/default/converge.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
- name: Asserting after performing opeartion with invalid hostname
5555
ansible.builtin.assert:
5656
that:
57-
- idrac_server_powerstate_out.msg == "<urlopen error [Errno -2] Name or service not known>"
57+
- idrac_server_powerstate_out.msg == "<urlopen error [Errno -2] Name or service not known>" or
58+
idrac_server_powerstate_out.msg == "<urlopen error Unable to resolve hostname or IP randomHostname:443.>"
5859

5960
- name: Performing operation 'On' with invalid username
6061
ansible.builtin.import_role:

roles/redfish_firmware/molecule/negative/converge.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
- name: TC - 003 - Asserting wrong hostname
2121
ansible.builtin.assert:
2222
that:
23-
- redfish_firmware_out.msg == "<urlopen error [Errno -2] Name or service not known>"
23+
- redfish_firmware_out.msg == "<urlopen error [Errno -2] Name or service not known>" or
24+
redfish_firmware_out.msg == "<urlopen error Unable to resolve hostname or IP randomHostname:443.>"
2425

2526
- name: TC - 004 - Provide wrong username
2627
ansible.builtin.import_role:

0 commit comments

Comments
 (0)