Skip to content

Commit 3a3255f

Browse files
committed
Refactor ASCS node crash test case message handling to use default values for missing ERS node data
1 parent f348c16 commit 3a3255f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/roles/ha_scs/tasks/ascs-node-crash.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,15 @@
9898
ansible.builtin.set_fact:
9999
test_case_message_from_test_case: |
100100
Old ASCS: {{ cluster_status_pre.ascs_node }}
101-
New ASCS: {{ hostvars[cluster_status_pre.ers_node].cluster_status_test_execution.ascs_node
102-
or hostvars[cluster_status_pre.ascs_node].cluster_status_test_execution.ascs_node }}
101+
New ASCS: {{ hostvars[cluster_status_pre.ers_node].cluster_status_test_execution.ascs_node | default('N/A') }}
103102
Old ERS: {{ cluster_status_pre.ers_node }}
104-
New ERS: {{ hostvars[cluster_status_pre.ers_node].cluster_status_test_execution.ers_node
105-
or hostvars[cluster_status_pre.ascs_node].cluster_status_test_execution.ers_node }}
103+
New ERS: {{ hostvars[cluster_status_pre.ers_node].cluster_status_test_execution.ers_node | default('N/A') }}
106104
test_case_details_from_test_case: {
107105
"Pre Validations: Validate HANA DB cluster status": "{{ cluster_status_pre }}",
108106
"Pre Validations: CleanUp any failed resource": "{{ cleanup_failed_resource_pre }}",
109107
"Test Execution: Crash ASCS resource": "{{ ascs_crash_result }}",
110108
"Test Execution: Cleanup resources": "{{ cleanup_failed_resource_test_execution }}",
111-
"Post Validations Result": "{{ hostvars[cluster_status_pre.ers_node].cluster_status_test_execution
112-
or hostvars[cluster_status_pre.ascs_node].cluster_status_test_execution }}",
109+
"Post Validations Result": "{{ hostvars[cluster_status_pre.ers_node].cluster_status_test_execution }}",
113110
}
114111
# /*---------------------------------------------------------------------------
115112
# | Post Validations |

0 commit comments

Comments
 (0)