Skip to content

Commit

Permalink
* [e2e] fix volumes' error code check
Browse files Browse the repository at this point in the history
  • Loading branch information
lanfon72 authored and khushboo-rancher committed Apr 10, 2024
1 parent 0cf7b78 commit 790c494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion harvester_e2e_tests/integrations/test_1_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_delete_volume_on_deleted_vm(self, api_client, ubuntu_image, ubuntu_vm,
self.delete_vm(api_client, ubuntu_vm, polling_for)

code, data = api_client.volumes.delete(vol_name)
assert 200 == code, f"Fail to delete volume\n{code}, {data}"
assert code in (200, 204), f"Fail to delete volume\n{code}, {data}"

# Check Volume
code, data = api_client.volumes.get(vol_name)
Expand Down
4 changes: 2 additions & 2 deletions harvester_e2e_tests/integrations/test_3_vm_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def test_delete(self, api_client, unique_vm_name, wait_timeout):
while endtime > datetime.now():
l_check = dict()
for vol_name, (code, data) in check.items():
if 200 != code:
if code not in (200, 204):
fails.append((vol_name, f"Failed to delete\nStatus({code}): {data}"))
else:
code, data = api_client.volumes.get(vol_name)
Expand Down Expand Up @@ -1628,7 +1628,7 @@ def test_create_vm_no_available_resources(resource, api_client, image,
while endtime > datetime.now():
l_check = dict()
for vol_name, (code, data) in check.items():
if 200 != code:
if code not in (200, 204):
fails.append(
(vol_name, f"Failed to delete\nStatus({code}): {data}"))
else:
Expand Down

0 comments on commit 790c494

Please sign in to comment.