Skip to content

Commit f4d439b

Browse files
Prabhu SreenivasanPrabhuSreenivasan
authored andcommitted
fix LGTM errors
Signed-off-by: Prabhu Sreenivasan <[email protected]>
1 parent 053fe31 commit f4d439b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/test_crm.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -707,21 +707,24 @@ def test_CrmSnatEntry(self, dvs, testlog):
707707
# get counters
708708
used_counter = getCrmCounterValue(dvs, 'STATS', 'crm_stats_snat_entry_used')
709709
avail_counter = getCrmCounterValue(dvs, 'STATS', 'crm_stats_snat_entry_available')
710-
assert avail_counter !=0
710+
assert used_counter == 0
711+
assert avail_counter != 0
711712

712713
def test_CrmDnatEntry(self, dvs, testlog):
713714

714715
# get counters
715716
used_counter = getCrmCounterValue(dvs, 'STATS', 'crm_stats_dnat_entry_used')
716717
avail_counter = getCrmCounterValue(dvs, 'STATS', 'crm_stats_dnat_entry_available')
717-
assert avail_counter !=0
718+
assert used_counter == 0
719+
assert avail_counter != 0
718720

719721
def test_CrmIpmcEntry(self, dvs, testlog):
720722

721723
# get counters
722724
used_counter = getCrmCounterValue(dvs, 'STATS', 'crm_stats_ipmc_entry_used')
723725
avail_counter = getCrmCounterValue(dvs, 'STATS', 'crm_stats_ipmc_entry_available')
724-
assert avail_counter !=0
726+
assert used_counter == 0
727+
assert avail_counter != 0
725728

726729
def test_Configure(self, dvs, testlog):
727730

@@ -965,11 +968,11 @@ def test_Configure_ipmc(self, dvs, testlog):
965968
dvs.runcmd("crm config thresholds ipmc type percentage")
966969
967970
time.sleep(2)
968-
threshold_low = getCrmConfigValue(dvs, 'Config', 'snat_entry_low_threshold')
971+
threshold_low = getCrmConfigValue(dvs, 'Config', 'ipmc_entry_low_threshold')
969972
assert threshold_low == 50
970-
threshold_high = getCrmConfigValue(dvs, 'Config', 'snat_entry_high_threshold')
973+
threshold_high = getCrmConfigValue(dvs, 'Config', 'ipmc_entry_high_threshold')
971974
assert threshold_high == 90
972-
threshold_type = getCrmConfigStr(dvs, 'Config', 'snat_entry_threshold_type')
975+
threshold_type = getCrmConfigStr(dvs, 'Config', 'ipmc_entry_threshold_type')
973976
assert threshold_type == 'percentage'
974977
'''
975978

0 commit comments

Comments
 (0)