Skip to content

Commit

Permalink
chore(bors): merge pull request openebs#716
Browse files Browse the repository at this point in the history
716: test(volume/resize): add bdd tests for offline volume resize r=dsharma-dc a=dsharma-dc



Co-authored-by: Diwakar Sharma <[email protected]>
  • Loading branch information
mayastor-bors and dsharma-dc committed Jan 30, 2024
2 parents 15d7b33 + c2419d0 commit 6121768
Show file tree
Hide file tree
Showing 2 changed files with 510 additions and 0 deletions.
65 changes: 65 additions & 0 deletions tests/bdd/features/volume/resize/resize_offline.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Feature: Volume resize

Background:
Given a deployer cluster

Scenario Outline: Expand an unpublished volume
Given an unpublished volume with <repl_count> replicas and all are healthy
When we issue a volume expand request
Then the request should succeed
And all the replicas of the volume should be resized to the new capacity
And the volume is expanded to the new capacity
Examples:
| repl_count |
| 1 |
| 3 |


Scenario: Expand an unpublished volume and then make it published
Given an unpublished volume with more than one replica and all are healthy
When we issue a volume expand request
Then the request should succeed
And all the replicas of the volume should be resized to the new capacity
And the volume is expanded to the new capacity
When the volume is published
Then the volume should get published with expanded capacity
And the new capacity should be available for the application to use
When the volume replica count is increased by 1
Then the new replica should have expanded size


Scenario: Expand a published volume
Given a published volume with more than one replica and all are healthy
When we issue a volume expand request
Then the volume expand status should be failure
And the failure reason should be volume-in-use precondition


Scenario: Expand a published volume after unpublishing it while having an offline replica
Given a published volume with more than one replica and all are healthy
When the volume is receiving IO
And one of the replica goes offline
And the volume is unpublished
And the replica comes online again
And we issue a volume expand request
Then the request should succeed
And all the replicas of the volume should be resized to the new capacity
When the volume is republished
Then the volume should get published with expanded capacity
And the onlined replica should be rebuilt



Scenario: Expand an unpublished volume with an offline replica
Given an unpublished volume with more than one replica
And one of the replica is not in online state
When we issue a volume expand request
Then the volume expand status should be failure


# Volume shrink/downsize isn't supported by csi.
Scenario: Shrink an unpublished volume
Given an unpublished volume with more than one replica and all are healthy
When we issue a volume shrink request
Then the volume resize status should be failure
And the failure reason should be invalid arguments
Loading

0 comments on commit 6121768

Please sign in to comment.