-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(volgroup_vgpattern_bdd): adding feature file
Signed-off-by: Abhilash Shetty <[email protected]>
- Loading branch information
1 parent
8d41ce4
commit 68beeba
Showing
1 changed file
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
|
||
Feature: Validate vgpattern and volgroup based scheduling. | ||
Background: | ||
Given Single lvmnode cluster is configured | ||
And lvm vg "lvmvg" is created on a node | ||
|
||
Scenario: test sc with volgroup present on the node | ||
Given a sc is created with volgroup as "lvmvg" | ||
And pvc is created referencing the same sc | ||
Then lvmvolume cr should get created | ||
And cr state should be Ready | ||
|
||
Scenario: test sc with volgroup not present on the node | ||
Given a sc is created with volgroup as "lvmvgn" | ||
And pvc is created referencing the same sc | ||
Then pvc should be in Pending | ||
And lvmvolume cr should not get created | ||
|
||
|
||
Background: | ||
Given Single lvmnode cluster is configured | ||
And lvm vg "lvmvg" and "lvmvg1" is created on a node | ||
|
||
Scenario: test sc with vgpattern matching atleast one vg | ||
Given sc is created with vgpattern "lvmvg1.*" | ||
When a pvc is created by referencing the sc | ||
Then pvc should be Bound | ||
And lvmvolume should be in "lvmvg1" vg | ||
|
||
|
||
Scenario: test sc with vgpattern matching no vg | ||
Given sc is created with vgpattern "lvmvgn.*" | ||
When a pvc is created by referencing the sc | ||
Then pvc should not be Bound | ||
And lvmvolume should not be created | ||
|
||
|
||
Scenario: test pvc with higher size then vg free space | ||
Given "lvmvg" has lesser free space then "lvmvg1" | ||
And sc is created with volgroup as "lvmvg" | ||
When a pvc is created with size higher then "lvmvg" and lower then "lvmvg1" free space | ||
Then pvc should not be boun | ||
And lvmvolume cr should not be created | ||
|
||
|
||
|
||
Background: | ||
Given a 3 lvmnode cluster is configured | ||
And each node <node> has <vg> created with same size | ||
|
||
Scenario: test sc with volgroup present only on one node | ||
Given a sc is created with volgroup as "lvmvg1" with no topology | ||
When pvc is created referencing the same sc | ||
Then pvc should be in Pending state | ||
And lvmvolume cr should not be created | ||
|
||
Scenario: test sc with volgroup present on one node with allowed topology | ||
Given a sc is created with volgroup as "lvmvg1" | ||
And sc has topology key with "node1" value | ||
When pvc is created referencing the same sc | ||
Then pvc should be bound | ||
And lvmvolume cr should be Ready | ||
And lvmvolume node should be allowed topology node | ||
|
||
Scenario: test sc with volgroup not present on any node | ||
Given a sc is created with volgroup as "lvmvgn" | ||
When pvc is created referencing the same sc | ||
Then pvc should be in Pending state | ||
And lvmvolume should not be created | ||
|
||
|
||
|
||
Examples: | ||
| node | vg | | ||
| node1 | lvmvg1 | | ||
| node2 | lvmvg2 | | ||
| node3 | lvmvg3 | | ||
|
||
|
||
|
||
Background: | ||
Given a 3 lvmnode cluster is configured | ||
And each node <node> has <vg> created with <size> | ||
|
||
Scenario: test sc with volgroup present on 2 nodeswith varying free space and allowed topology | ||
Given an sc is created with volgroup "lvmvg" | ||
And node1 and node2 is in allowed topology | ||
When a pvc is created with "1.3G" size | ||
Then pvc should be Bound | ||
And lvmvolume should in Ready state | ||
And volume owner should be node2 | ||
|
||
Examples: | ||
| node | vg | size | | ||
| node1 | lvmvg | 1G | | ||
| node2 | lvmvg | 1.5G | | ||
| node3 | lvmvgdiff | 1G | | ||
|
||
|
||
Scenario: test sc with volgroup present on 2 nodes with less space and allowed topology | ||
Given an sc is created with volgroup "lvmvg" | ||
And node1 and node2 is in allowed topology | ||
When a pvc is created with "1.3G" size | ||
Then pvc should be Pending | ||
And lvmvolume should not be created | ||
|
||
Examples: | ||
| node | vg | size | | ||
| node1 | lvmvg | 1G | | ||
| node2 | lvmvg | 1G | | ||
| node3 | lvmvgdiff | 1G | | ||
|
||
|
||
|
||
Background: | ||
|
||
Given a 3 lvmnode cluster is configured | ||
And each node <node> has <vg> and <vg2> created with same size | ||
|
||
Scenario: test sc with vgpattern matching vg present in all node | ||
Given sc1 is created with vgpattern "lvmvg1.*" | ||
And sc2 is created with vgpattern "lvmvg2.*" | ||
And sc3 is created with vgpattern "lvmvg3*." | ||
When pvc1 is created referencing sc1 | ||
And pvc2 is created referencing sc2 | ||
And pvc3 is created referencing sc3 | ||
Then pvc1 and pvc2 should be in Bound state | ||
And pvc1 and pvc2 lvmvolume should be in correct vg and node | ||
And pvc3 should be in Pending state | ||
|
||
|
||
Examples: | ||
| node | vg | vg2 | | ||
| node1 | lvmvg11 | lvmvg21 | | ||
| node2 | lvmvg12 | lvmvg22 | | ||
| node3 | lvmvg13 | lvmvg23 | |