Skip to content

Commit

Permalink
Updated test failure messages
Browse files Browse the repository at this point in the history
  • Loading branch information
geetanjalimanegslab committed Feb 21, 2025
1 parent 5f693a8 commit 564942c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions anta/tests/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test(self) -> None:
for interface, value in command_output["xcvrSlots"].items():
if value["mfgName"] not in self.inputs.manufacturers:
self.result.is_failure(
f"Interface: {interface} - Transceivers are from unapproved manufacturers - Expected: {', '.join(self.inputs.manufacturers)}"
f"Interface: {interface} - Transceiver is from unapproved manufacturers - Expected: {', '.join(self.inputs.manufacturers)}"
f" Actual: {value['mfgName']}"
)

Expand Down Expand Up @@ -119,7 +119,7 @@ def test(self) -> None:
if sensor["hwStatus"] != "ok":
self.result.is_failure(f"Sensor: {sensor['name']} - Invalid Hardware State - Expected: ok Actual: {sensor['hwStatus']}")
if sensor["alertCount"] != 0:
self.result.is_failure(f"Sensor: {sensor['name']} - Non-zero alert-count - Actual: {sensor['alertCount']}")
self.result.is_failure(f"Sensor: {sensor['name']} - Non-zero alert counter - Actual: {sensor['alertCount']}")


class VerifyEnvironmentSystemCooling(AntaTest):
Expand Down
6 changes: 3 additions & 3 deletions tests/units/anta_tests/test_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"expected": {
"result": "failure",
"messages": [
"Interface: 1 - Transceivers are from unapproved manufacturers - Expected: Arista Actual: Arista Networks",
"Interface: 2 - Transceivers are from unapproved manufacturers - Expected: Arista Actual: Arista Networks",
"Interface: 1 - Transceiver is from unapproved manufacturers - Expected: Arista Actual: Arista Networks",
"Interface: 2 - Transceiver is from unapproved manufacturers - Expected: Arista Actual: Arista Networks",
],
},
},
Expand Down Expand Up @@ -178,7 +178,7 @@
"inputs": None,
"expected": {
"result": "failure",
"messages": ["Sensor: DomTemperatureSensor54 - Non-zero alert-count - Actual: 1"],
"messages": ["Sensor: DomTemperatureSensor54 - Non-zero alert counter - Actual: 1"],
},
},
{
Expand Down

0 comments on commit 564942c

Please sign in to comment.