Skip to content

Commit

Permalink
Update iSCSI test to take account that initiator may have been autode…
Browse files Browse the repository at this point in the history
…leted.
  • Loading branch information
bmeagherix committed Jun 6, 2024
1 parent 7361184 commit 91455de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/api2/test_iscsi_auth_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def initiator():
try:
yield initiator_config
finally:
call('iscsi.initiator.delete', initiator_config['id'])
# Very likely that already cleaned up (by removing only target using it)
if call('iscsi.initiator.query', [['id', '=', initiator_config['id']]]):
call('iscsi.initiator.delete', initiator_config['id'])


@contextlib.contextmanager
Expand Down

0 comments on commit 91455de

Please sign in to comment.