Skip to content

Commit

Permalink
gherkin script for HPA-add,edit an delete-ODC-3556
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket committed Aug 26, 2020
1 parent 06495d2 commit 3f7be81
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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

@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 sees Add Horizontal Pod Autoscaler page opens with form view selected
And user sees name field
And user sees minimum and maximum pods with increasing and decreasing button
And user sees CPU Utilization with % at the end
And user sees Memory Utilization with % at the end
And user sees save and cancel button at the end

@regression
Scenario: Add HPA to deployment/deployment-config
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 'example'
And user increase minimum and maximum pods value to 2 and 5 respectively
And user gives CPU Utilization and Memory Utilization value as 60 and 30
And user clicks on save
And user is taken to topology
And user opens the sidebar
Then user can see two pods under pod section
And user can see Horizontal Pod Autoscalers section
And user sees the example with HPA tag associated present under HPA section

@regression, @manual
Scenario: Add HPA form 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 the and checks schema
And user closes the schema
And user checks the YAML
And user assign name value example
And user gives value to averageUtilization under cpu target as 60
And user clicks on save
And user is taken to topology
And user opens the sidebar
Then user can see Horizontal Pod Autoscalers section
And user sees the example with HPA tag associated present under HPA section
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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/deployment-config
And user has assigned values to cpu and memory value in resource limit section of advanced option
And user is in topology

@regression
Scenario: Remove HPA
Given user has a workload 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 sees HPA section gets removed
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Feature: Edit 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/deployment-config
And user has assigned values to cpu and memory value in resource limit section of advanced option
And user is in topology

@regression
Scenario: Edit HPA action form view
Given user has a workload 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 for maximum and minimum pods
And user checks and edit the cpu value and memory value
And user clicks on save
And user is taken to topology
And user opens the sidebar
And user can see Horizontal Pod Autoscalers section
And user goes to the details tab
Then user sees the changed pods number

@regression, @manual
Scenario: Edit HPA action YAML view
Given user has a workload 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 the and checks schema
And user closes the schema
And user checks the YAML
And user checks and edits values of cpu and memory under metrics.resource.target.averageUtilization
And user checks and edits minimum and maximum pods value in minReplicas and maxReplicas
And user checks the name value under metadata.name
And user clicks on save
And user is taken to topology
And user opens the sidebar
And user can see Horizontal Pod Autoscalers section
And user goes to the details tab
Then user sees the changed pods number

@regression, @manual
Scenario: Edit HPA YAML view to form view
Given user has a workload 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 the and checks schema
And user closes the schema
And user checks the YAML
And user changes values of cpu and memory under metrics.resource.target.averageUtilization
And user changes minimum and maximum pods value in minReplicas and maxReplicas
And user edits the name value under metadata.name
And user switches to form view
Then user checks the changed values in form view

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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: Add HPA Sidebar
Given user is in topology
When user opens sidebar of workload
And user sees Horizontal Pod Autoscalers section under resource tab
And user opens action menu
And user can not see Edit Pod Count option
And user clicks on details tab
Then user sees the scaling of the pod disabled
And user sees the arrows to increase and decrease pod is not present
And user sees 'Autoscaling to' inside the pod donut

0 comments on commit 3f7be81

Please sign in to comment.