-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gherkin script for HPA-add,edit an delete-ODC-3556
- Loading branch information
Sanket
committed
Sep 3, 2020
1 parent
06495d2
commit 6caea33
Showing
4 changed files
with
280 additions
and
0 deletions.
There are no files selected for viewing
116 changes: 116 additions & 0 deletions
116
...sole/integration-tests/features/topology/horizonta_pod_autoscaling/Add_HPA_Action.feature
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,116 @@ | ||
Feature: Add HPA action and topology sidebar modifications | ||
As a user, I want to add a HPA to a workload | ||
|
||
Background: | ||
Given user is in developer perspective | ||
And user has created a deployment | ||
And user has added CPU resource limit | ||
And user has added Memory resource limit | ||
|
||
@regression | ||
Scenario: Add HPA form | ||
Given user is in topology | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Add Horizontal Pod Autoscaler option | ||
Then user can see Add Horizontal Pod Autoscaler page opens with form view selected | ||
And user can see name field | ||
And user can see minimum pods with increasing and decreasing button | ||
And user can see maximum pods with increasing and decreasing button | ||
And user can see CPU Utilization | ||
And user can see Memory Utilization | ||
And user can see save and cancel button at the end | ||
|
||
@regression | ||
Scenario: Add HPA to deployment from action menu | ||
Given user is in topology | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Add Horizontal Pod Autoscaler option | ||
And user sees Add Horizontal Pod Autoscaler page opens with form view selected | ||
And user adds name "<hpa_name>" | ||
And user assigns minimum pods value to "<hpa_min_pod>" | ||
And user assigns maximum pods value to "<hpa_max_pod>" | ||
And user gives CPU Utilization value as "<cpu_utilisation>" | ||
And user gives Memory Utilization value as "<memory_utilization>" | ||
And user clicks on save to get back to topology page | ||
And user opens the sidebar | ||
And user selects on resource tab | ||
Then user can see two pods under pod section | ||
And user can see Horizontal Pod Autoscalers section | ||
And user can see the "<hpa_name>" with HPA tag associated present under HPA section | ||
|
||
Examples: | ||
| hpa_name | hpa_max_pod | hpa_min_pod | cpu_utilisation | memory_utilization | | ||
| test-hpa | 5 | 2 | 60 | 30 | | ||
|
||
@regression | ||
Scenario: Add HPA to deployment from context menu | ||
Given user is in topology | ||
When user right clicks on workload to open context menu | ||
And user clicks on Add Horizontal Pod Autoscaler option | ||
And user sees Add Horizontal Pod Autoscaler page opens with form view selected | ||
And user adds name "<hpa_name>" | ||
And user assigns minimum pods value to "<hpa_min_pod>" | ||
And user assigns maximum pods value to "<hpa_max_pod>" | ||
And user gives CPU Utilization value as "<cpu_utilisation>" | ||
And user gives Memory Utilization value as "<memory_utilization>" | ||
And user clicks on save to get back to topology page | ||
And user opens the sidebar | ||
And user selects on resource tab | ||
Then user can see two pods under pod section | ||
And user can see Horizontal Pod Autoscalers section | ||
And user can see the "<hpa_name>" with HPA tag associated present under HPA section | ||
|
||
@regression, @manual | ||
Scenario: Add HPA from YAML view | ||
Given user is in topology | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Add Horizontal Pod Autoscaler option | ||
And user sees Add Horizontal Pod Autoscaler page opens with form view selected | ||
And user selects YAML view option | ||
And user sees schema on the right sidebar | ||
And user scrolls and checks schema | ||
And user closes the schema | ||
And user checks the YAML | ||
And user assigns name value as "<hpa_name>" | ||
And user gives value to averageUtilization under cpu target as "<cpu_utilisation>" | ||
And user clicks on save to get back to topology page | ||
And user opens the sidebar | ||
And user selects on resource tab | ||
Then user can see Horizontal Pod Autoscalers section | ||
And user can see the "<hpa_name>" with HPA tag associated present under HPA section | ||
|
||
@regression, @manual | ||
Scenario: Add HPA from Administrative perspective | ||
Given user is in topology | ||
When user switches to administrative perspective | ||
And user goes to Workloads | ||
And user selects Horizontal Pod Autoscalers option | ||
And user clicks Create Horizontal Pod Autoscaler button | ||
And user sees Create Horizontal Pod Autoscaler in YAML view | ||
And user sees schema on the right sidebar | ||
And user scrolls and checks schema | ||
And user closes the schema | ||
And user changes the metadata.name to "<name_hpa>" | ||
And user changes the spec.scaleTargetRef.name to "<workload_name>" | ||
And user changes the spec.minReplicas to "<min_hpa_pod>" | ||
And user changes the spec.maxReplicas to "<max_hpa_pod>" | ||
And user changes value to spec.metrics.resource.target.averageUtilization under cpu target as "<cpu_util>" | ||
And user adds new field for memory similar to cpu under spec.metrics as resource.name with value memory | ||
And user adds value for memory to spec.metrics.resource.target.averageUtilization under memory target as "<memory_util>" | ||
And user sees save, reload and cancel button | ||
And user clicks on save to get to Horizontal Pod Autoscalers Details | ||
And user checks details with Action menu on top | ||
And user sees Edit Labels, Edit Annotaions, Edit Horizontal Pod Autoscaler, Delete Horizontal Pod Autoscaler options in action menu | ||
And user checks details, YAML and Events tabs | ||
And user switches to developer perspective | ||
And user opens the sidebar of the "<workload_name>" | ||
And user selects on resource tab | ||
Then user can see Horizontal Pod Autoscalers section | ||
And user can see the "<name_hpa>" with HPA tag associated present under HPA section | ||
|
||
Examples: | ||
| workload_name | name_hpa | max_hpa_pod | min_hpa_pod | cpu_util | memory_util | | ||
| nodejs-ex-git-1 | test-hpa | 5 | 2 | 60 | 30 | |
35 changes: 35 additions & 0 deletions
35
...e/integration-tests/features/topology/horizonta_pod_autoscaling/Delete_HPA_Action.feature
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,35 @@ | ||
Feature: Delete HPA action | ||
As a user, I want to remove the HPA assigned to a workload | ||
|
||
Background: | ||
Given user is in developer perspective | ||
And user has created a deployment | ||
And user has added CPU resource limit | ||
And user has added Memory resource limit | ||
And user is in topology | ||
|
||
@regression | ||
Scenario: Remove HPA | ||
Given user has a workload "nodejs-ex-git-1" with HPA assigned to it | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Remove Horizontal Pod Autoscaler option | ||
And user sees Remove Horizontal Pod Autoscaler modal opens | ||
And user sees Remove and Cancel option | ||
And user clicks Remove | ||
Then user can see HPA section gets removed | ||
|
||
@regression | ||
Scenario: Delete HPA from Administrative perspective | ||
Given user has a workload "nodejs-ex-git-1" with HPA assigned to it | ||
When user switches to administrative perspective | ||
And user goes to Workloads | ||
And user selects Horizontal Pod Autoscalers option | ||
And user opens the HPA associated with the workload | ||
And user sees the HPA details page | ||
And user opens action menu | ||
And user clicks on Delete Horizontal Pod Autoscaler option | ||
And user sees Delete Horizontal Pod Autoscaler modal opens | ||
And user sees Delete and Cancel option | ||
And user clicks Delete | ||
Then user can see the intended HPA is deleted |
108 changes: 108 additions & 0 deletions
108
...ole/integration-tests/features/topology/horizonta_pod_autoscaling/Edit_HPA_Action.feature
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,108 @@ | ||
Feature: Edit HPA action | ||
As a user, I want to edit the HPA assigned to a workload | ||
|
||
Background: | ||
Given user is in developer perspective | ||
And user has created a deployment | ||
And user has added CPU resource limit | ||
And user has added Memory resource limit | ||
And user is in topology | ||
|
||
@regression | ||
Scenario: Edit HPA action form view | ||
Given user has a workload "<workload_name>" with HPA assigned to it | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Edit Horizontal Pod Autoscaler option | ||
And user sees Edit Horizontal Pod Autoscaler form opens | ||
And user sees values are prefilled | ||
And user checks the name value but can not edit it | ||
And user checks and edit the value to "<hpa_max_pod>" for maximum pods | ||
And user checks and edit the value to "<hpa_min_pod>" for minimum pods | ||
And user checks and edit the cpu value to "<cpu_utilisation>" | ||
And user checks and edit the memory value to "<memory_utilization>" | ||
And user clicks on save to get back to topology page | ||
And user opens the sidebar | ||
And user selects on resource tab | ||
And user sees Horizontal Pod Autoscalers section | ||
And user goes to the details tab | ||
Then user can see the changed pods number | ||
|
||
Examples: | ||
| workload_name | hpa_max_pod | hpa_min_pod | cpu_utilisation | memory_utilization | | ||
| nodejs-ex-git-1 | 6 | 3 | 75 | 50 | | ||
|
||
@regression, @manual | ||
Scenario: Edit HPA action YAML view | ||
Given user has a workload "<workload_name>" with HPA assigned to it | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Edit Horizontal Pod Autoscaler option | ||
And user sees Edit Horizontal Pod Autoscaler page opens with form view selected | ||
And user selects YAML view option | ||
And user sees schema on the right sidebar | ||
And user scrolls and checks schema | ||
And user closes the schema | ||
And user checks the YAML | ||
And user checks and edits values of cpu under metrics.resource.target.averageUtilization to "<cpu_utilisation>" | ||
And user checks and edits values of memory under metrics.resource.target.averageUtilization to "<memory_utilization>" | ||
And user checks and edits minimum pods value to "<hpa_min_pod>" in minReplicas | ||
And user checks and edits maximum pods value to "<hpa_max_pod>" in maxReplicas | ||
And user checks the name value under metadata.name | ||
And user clicks on save to get back to topology page | ||
And user opens the sidebar | ||
And user selects on resource tab | ||
And user sees Horizontal Pod Autoscalers section | ||
And user goes to the details tab | ||
Then user can see the changed pods number | ||
|
||
@regression, @manual | ||
Scenario: Edit HPA YAML view to form view | ||
Given user has a workload "<workload_name>" with HPA assigned to it | ||
When user opens sidebar of workload | ||
And user opens action menu | ||
And user clicks on Edit Horizontal Pod Autoscaler option | ||
And user sees Edit Horizontal Pod Autoscaler page opens with form view selected | ||
And user selects YAML view option | ||
And user sees the schema on the right sidebar | ||
And user checks the schema | ||
And user closes the schema window | ||
And user checks the YAML | ||
And user changes values of cpu under metrics.resource.target.averageUtilization with resource name as cpu to "<cpu_utilisation>" | ||
And user changes values of memory under metrics.resource.target.averageUtilization with resource name as memory to "<memory_utilization>" | ||
And user changes minimum pods value to "<hpa_min_pod>" in minReplicas | ||
And user changes maximum pods value to "<hpa_max_pod>" in maxReplicas | ||
And user switches to form view | ||
Then user checks the changed values in form view | ||
|
||
@regression, @manual | ||
Scenario: Edit HPA from Administrative perspective | ||
Given user has a workload "<workload_name>" with HPA named "<name_hpa>" assigned to it | ||
When user switches to administrative perspective | ||
And user goes to Workloads | ||
And user selects Horizontal Pod Autoscalers option | ||
And user opens the HPA associated with the workload | ||
And user sees the HPA details page | ||
And user opens action menu | ||
And user clicks on Edit Horizontal Pod Autoscaler option | ||
And user sees schema on the right sidebar | ||
And user closes the schema | ||
And user checks the spec.scaleTargetRef.name to be "<workload_name>" | ||
And user changes the metadata.name to "<new_name_hpa>" | ||
And user clicks on save | ||
And user sees error is thrown saying resource name cannot be changed | ||
And user restores the previous name value i.e. "<name_hpa>" | ||
And user edits the spec.minReplicas to "<min_hpa_pod>" | ||
And user edits the spec.maxReplicas to "<max_hpa_pod>" | ||
And user edits value for cpu to spec.metrics.resource.target.averageUtilization under cpu target as "<cpu_util>" | ||
And user edits value for memory to spec.metrics.resource.target.averageUtilization under memory target as "<memory_util>" | ||
And user sees save, reload and cancel button | ||
And user clicks on save | ||
And user sees YAML gets updated with updation message | ||
And user clicks on details tab | ||
Then user can see Min Replicas and Max Replicas updated value | ||
And user can see Target value of resource memory and resource cpu to be the updated value | ||
|
||
Examples: | ||
| workload_name | name_hpa | new_name_hpa | max_hpa_pod | min_hpa_pod | cpu_util | memory_util | | ||
| nodejs-ex-git-1 | test-hpa | new-test-hpa | 7 | 4 | 75 | 60 | |
21 changes: 21 additions & 0 deletions
21
...egration-tests/features/topology/horizonta_pod_autoscaling/HPA_Topology_&_Sidebar.feature
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,21 @@ | ||
Feature: Add HPA action and topology sidebar modifications | ||
As a user, I want to add a HPA to a workload | ||
|
||
Background: | ||
Given user is in developer perspective | ||
And user has created a deployment/deployment-config | ||
And user has assigned values to cpu and memory value in resource limit section of advanced option | ||
And user has a workload with HPA assigned to it | ||
|
||
@regression @manual | ||
Scenario: Changes due to HPA in Workload Sidebar | ||
Given user is in topology | ||
When user opens sidebar of workload | ||
And user selects on resource tab | ||
And user sees Horizontal Pod Autoscalers section | ||
And user opens action menu | ||
And user does not see Edit Pod Count option | ||
And user clicks on details tab | ||
Then user can see the scaling of the pod disabled | ||
And user can see the arrows to increase and decrease pods are not present | ||
And user can see the pod value inside the pod donut |