Skip to content

Commit a4b1688

Browse files
committed
Merge pull request #1731 from shapeblue/oobm-changepasswd-fix
CLOUDSTACK-9565: Fix intermittent failure in test_oobm_zchange_passwordFixes intermittent integration smoke test failures caused in test_oobm_zchange_password test. The scope is limited to the integration test only, and full integration test suite is not necessary. We can only consider code reviews and merge on basis of Travis results. * pr/1731: CLOUDSTACK-9565: Fix intermittent failure in test_oobm_zchange_password Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 parents 770397c + 29844a3 commit a4b1688

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)