Skip to content

Commit b8dae7e

Browse files
committed
Improve error messages in AzureLoadBalancer class and update task name in loadbalancer.yml for clarity
1 parent b4c8a77 commit b8dae7e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/modules/get_azure_lb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ def _create_network_client(self):
162162
)
163163
except Exception as ex:
164164
self.handle_error(ex)
165-
self.result["message"] += f"Failed to create network client object. {ex} \n"
165+
self.result["message"] += (
166+
" Failed to authenticate to Azure to read the Load " + f"Balancer Details. {ex} \n"
167+
)
166168

167169
def get_load_balancers(self) -> list:
168170
"""
@@ -181,7 +183,7 @@ def get_load_balancers(self) -> list:
181183

182184
except Exception as ex:
183185
self.handle_error(ex)
184-
self.result["message"] += f"Failed to create network client object. {ex} \n"
186+
self.result["message"] += f" Failed to get load balancers. {ex} \n"
185187

186188
def get_load_balancers_details(self) -> dict:
187189
"""

src/roles/misc/tasks/loadbalancer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
constants: "{{ all_constants }}"
3939
register: test_result
4040

41-
- name: "Set the test case status to PASSED"
41+
- name: "Set the test case status"
4242
ansible.builtin.set_fact:
4343
test_case_name: "{{ item.name }}: {{ virtual_host }}"
4444
test_case_message: "{{ test_result.message }}"

src/vars/input-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ test_groups:
230230
ensures automatic failover to the ERS node, and confirms service continuity throughout
231231
the operation.
232232
enabled: true
233-
233+
234234
- name: "HAFailoverToNode Test"
235235
task_name: ha-failover-to-node
236236
description: |

0 commit comments

Comments
 (0)