Skip to content

Commit

Permalink
[issue-1256] e2e tests update
Browse files Browse the repository at this point in the history
  • Loading branch information
katarzynakulpa committed Dec 17, 2024
1 parent f2329d3 commit 8bc91eb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/e2e-test-framework/framework/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
DRIVE_HEALTH_ANNOTATION = "health"
VOLUME_RELEASE_ANNOTATION = "release"
FAKE_ATTACH_PVC_ANNOTATION_KEY = "pv.attach.kubernetes.io/ignore-if-inaccessible"
DRIVE_EJECT = "eject"

# annotation values
DRIVE_HEALTH_BAD_ANNOTATION = "BAD"
VOLUME_RELEASE_DONE_VALUE = "done"
FAKE_ATTACH_PVC_ANNOTATION_VALUE = "yes"
DRIVE_EJECT_AUTO = "auto"

# health
HEALTH_GOOD = "GOOD"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ def test_5921_auto_drive_replacement_with_multiple_volumes_per_pod(self):
# 2. simulate drive failure. Annotate drive used by pod with health=BAD
for drive in drives:
drive_name = drive["metadata"]["name"]
# mark drive as auto eject
self.utils.annotate_custom_resource(
resource_name=drive_name,
resource_type="drives",
annotation_key=const.DRIVE_EJECT,
annotation_value=const.DRIVE_EJECT_AUTO,
)
self.utils.annotate_custom_resource(
resource_name=drive_name,
resource_type="drives",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ def test_5955_auto_drive_replacement_with_multiple_volumes_per_pod_single_failur
failed_volume = volumes[0]
# 2. simulate drive failure. Annotate drive used by pod with health=BAD
failed_drive_name = failed_drive["metadata"]["name"]
# mark drive as auto eject
self.utils.annotate_custom_resource(
resource_name=failed_drive_name,
resource_type="drives",
annotation_key=const.DRIVE_EJECT,
annotation_value=const.DRIVE_EJECT_AUTO,
)
self.utils.annotate_custom_resource(
resource_name=failed_drive_name,
resource_type="drives",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def test_5771_auto_drive_replacement_with_one_volume_per_pod(self):

# 2.1 simulate drive failure. Annotate drive used by pod with health=BAD
drive_name = drive["metadata"]["name"]
# mark drive as auto eject
self.utils.annotate_custom_resource(
resource_name=drive_name,
resource_type="drives",
annotation_key=const.DRIVE_EJECT,
annotation_value=const.DRIVE_EJECT_AUTO,
)
self.utils.annotate_custom_resource(
resource_name=drive_name,
resource_type="drives",
Expand Down

0 comments on commit 8bc91eb

Please sign in to comment.