Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(bdd): adding scheduler logic bdd #323

Merged
merged 4 commits into from
Jul 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions tests/bdd/scheduler.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Feature: Validate scheduling algorithm
Background:
Given 3 node lvmnode cluster is configured
And lvm vg "lvmvg" with 20G is created on each node

Scenario: test CapacityWeighted scheduler logic
Given sc is created with scheduler parameter set to "CapacityWeighted"
When "pvc-1" is created using size "5G"
And "pvc-2" is created using size "5G"
And "pvc-3" is created using size "2G"
Then all three pvc lvmvolume should be placed on different nodes
When "pvc-4" is created with size "1G"
Then "pvc-4" lvmvolume should be placed on "pvc-3" lvmvolume node
When "pvc-5" is created with size "1G"
Then "pvc-5" lvmvolume should be placed on "pvc-4" lvmvolume node
abhilashshetty04 marked this conversation as resolved.
Show resolved Hide resolved
When "pvc-6" is created with size "2G"
Then "pvc-6" lvmvolume should be placed on "pvc-5" lvmvolume node
abhilashshetty04 marked this conversation as resolved.
Show resolved Hide resolved
When "pvc-7" is created with size "3G"
Then "pvc-7" lvmvolume should be placed on "pvc-1" or "pvc-2" lvmvolume node
When "pvc-8" is created with size "3G"
Then "pvc-8" lvmvolume should not be placed on "pvc-7" and "pvc-3" node
abhilashshetty04 marked this conversation as resolved.
Show resolved Hide resolved

Scenario: test SpaceWeighted with vgextend logic
Given sc is created by not setting scheduler parameter explicitly
When "pvc-1" is created with using size "6G"
And "pvc-2" is created with using size "2G"
And "pvc-3" is created with using size "3G"
Then all pvc lvmvolume should be placed on different nodes
When "pvc-1" vg is extended by 10G
And "pvc-4" is created with size "5G"
Then "pvc-4" lvmvolume should be placed on "pvc-1" lvmvolume node
abhilashshetty04 marked this conversation as resolved.
Show resolved Hide resolved

Scenario: test SpaceWeighted without vgextend logic
Given sc is created by not setting scheduler parameter explicitly
When "pvc-1" is created with using size "6G"
And "pvc-2" is created with using size "2G"
And "pvc-3" is created with using size "3G"
Then all pvc lvmvolume should be placed on different nodes
When "pvc-4" is created with size "5G"
Then "pvc-4" lvmvolume should be placed on "pvc-2" lvmvolume node

Scenario: test VolumeWighted logic
abhilashshetty04 marked this conversation as resolved.
Show resolved Hide resolved
Given sc is created with scheduler parameter set to "VolumeWeighted"
When "pvc-1" is created with using size "6G"
And "pvc-2" is created with using size "2G"
And "pvc-3" is created with using size "3G"
Then all pvc lvmvolume should be placed on different nodes
When "pvc-4" is created with size "4G"
Then "pvc-4" lvmvolume can be on any node
When "pvc-5" is created with size "3G"
Then "pvc-5" lvmvolume can not be on "pvc-4" node
When "pvc-6" is created with size "6G"
Then "pvc-6" can not be on "pvc-4" and "pvc-5" lvmvolume node
Loading