summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryatinkarel <ykarel@redhat.com>2023-02-17 17:27:50 +0530
committeryatinkarel <ykarel@redhat.com>2023-02-17 17:27:52 +0530
commit199ea6525ea281ace6149acca6fc40e34f0f4cb4 (patch)
treebc6b58fec788dd1d59991b349ad5a630feeadbc6
parentb915c7f35ff105d8ac613cc171cd9235a96eac8d (diff)
downloadtempest-199ea6525ea281ace6149acca6fc40e34f0f4cb4.tar.gz
Use assertLessEqual for downtime validation
The test was added as part of [1]. It should succeed when downtime is within the limit but it fails as below even if downtime is not higher than the allowed limit:- AssertionError: 5.0 not less than 5 : Downtime \ of 5.0 seconds is higher than expected '5' Fix it by using assertLessEqual so it fails only if downtime is higher than the allowed limit. [1] https://review.opendev.org/c/openstack/tempest/+/828686 Change-Id: I1bf87bd33aecf004d9cb650110f06454584f600c
-rw-r--r--tempest/scenario/test_network_advanced_server_ops.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
index f4f37b087..e6c6eb69a 100644
--- a/tempest/scenario/test_network_advanced_server_ops.py
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -275,7 +275,7 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
LOG.debug("Downtime seconds measured with downtime_meter = %r",
downtime)
allowed_downtime = CONF.validation.allowed_network_downtime
- self.assertLess(
+ self.assertLessEqual(
downtime, allowed_downtime,
"Downtime of {} seconds is higher than expected '{}'".format(
downtime, allowed_downtime))