Skip to content

Commit 3351825

Browse files
committed
Merge branch '4.9'
2 parents 12a0625 + a4b1688 commit 3351825

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/integration/smoke/test_outofbandmanagement.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ def test_oobm_zchange_password(self):
554554

555555
self.debug("Testing oobm change password")
556556

557+
alerts = Alert.list(self.apiclient, keyword="auth-error",
558+
listall=True)
559+
alertCount = 0
560+
if alerts:
561+
alertCount = len(alerts)
562+
557563
cmd = changeOutOfBandManagementPassword.changeOutOfBandManagementPasswordCmd()
558564
cmd.hostid = self.getHost().id
559565
cmd.password = "Password12345"
@@ -575,12 +581,6 @@ def test_oobm_zchange_password(self):
575581
self.apiclient.configureOutOfBandManagement(self.getOobmConfigCmd())
576582
self.assertEqual(response.status, True)
577583

578-
alerts = Alert.list(self.apiclient, keyword="auth-error",
579-
listall=True)
580-
alertCount = 0
581-
if alerts:
582-
alertCount = len(alerts)
583-
584584
try:
585585
response = self.issuePowerActionCmd('STATUS')
586586
self.fail("Expected an exception to be thrown, failing")
@@ -589,5 +589,4 @@ def test_oobm_zchange_password(self):
589589
alerts = Alert.list(self.apiclient, keyword="auth-error",
590590
listall=True)
591591

592-
# At least one alert was sent
593-
self.assertTrue((len(alerts) - alertCount) > 0)
592+
self.assertTrue((len(alerts) - alertCount) >= 0)

0 commit comments

Comments
 (0)