Skip to content

Commit

Permalink
[ISSUE-1219] Check CR removal before event generation
Browse files Browse the repository at this point in the history
Signed-off-by: Andrzej Zukowski <[email protected]>
  • Loading branch information
Andrzej-Zukowski committed Jul 25, 2024
1 parent 0493f99 commit 559baed
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,16 @@ def test_5771_auto_drive_replacement_with_one_volume_per_pod(self):
self.drive_utils[node_ip].remove(scsi_id)
logging.info(f"drive {drive_path}, {scsi_id} removed")

# 15. check for events DriveSuccessfullyRemoved in kubernetes events
# 15. check driveCR succesfully removed
drive_name = drive["metadata"]["name"]
assert self.utils.check_drive_cr_not_exist(
drive_name=drive_name
), f"Drive CR {drive_name} still exists"

# 16. check for events DriveSuccessfullyRemoved in kubernetes events
drive_name = drive["metadata"]["name"]
assert self.utils.event_in(
resource_name=drive_name,
reason=const.DRIVE_SUCCESSFULLY_REMOVED,
), f"event {const.DRIVE_SUCCESSFULLY_REMOVED} for drive {drive_name} not found"

# 16. check driveCR succesfully removed
drive_name = drive["metadata"]["name"]
assert self.utils.check_drive_cr_not_exist(
drive_name=drive_name
), f"Drive CR {drive_name} still exists"

0 comments on commit 559baed

Please sign in to comment.