Logo: Relish

  1. Sign in

Project: Console

Service Auto Scaling

  • @dxpcloud
  • @teardown_projects
Background
Given
I sign in to WeDeploy as a test user
And
my current user plan is "team"
Scenarios
View service scale screen with no scaled instances
Given
I create a project with ID "eta1"
And
I install a "WeDeploy Hosting" service with id "hosting1" for the project "eta1"
When
I visit "/projects/eta1/services/hosting1/scale"
Then
I should see in the Auto Scaling section
Instances in Use 10% 1 of 10 instances
Enable auto scaling
Given
I create a project with ID "eta2"
And
I install a "WeDeploy Hosting" service with id "hosting1" for the project "eta2"
And
I visit "/projects/eta2/services/hosting1/scale"
When
I click the "Enable Auto Scaling" button
Then
I should see the text "No Scaled Instances Yet"
And
the Manual Downscale button should be disabled
View scaled instances
Given
I create a project with ID "eta3"
And
I install a "WeDeploy Hosting" service with id "hosting1" for the project "eta3"
When
I scale up "hosting1-eta3" by 2 instances using api
Then
I should see in the Auto Scaling section
Instances in Use 30% 3 of 10 instances
And
the Instances in Use progress bar should have 1 segment for "default" instances
And
the Instances in Use progress bar should have 2 segments for "scaled" instances
And
I should see 2 instances in the Scaled Instances section
Disable auto scaling
Given
I create a project with ID "eta4"
And
I install a "WeDeploy Hosting" service with id "hosting1" for the project "eta4"
And
I scale up "hosting1-eta4" by 1 instance using api
And
I should see in the Auto Scaling section
Instances in Use 20% 2 of 10 instances
When
I click the "Disable Auto Scaling" button
Then
I should see the page title "Disable Auto Scaling"
And
the "Scaled Instances" disabled field should have the text "1"
And
the "Disable Auto Scaling" button should be disabled
And
I enter "hosting1" into the "Service ID" input field
And
I click the "Disable Auto Scaling" button
And
I should be at url ending with "/projects/eta4/services/hosting1/scale"
And
the "Enable Auto Scaling" button should be enabled
And
I should see in the Auto Scaling section
Instances in Use 10% 1 of 10 instances
And
I should not see the "Scaled Instances" section
  • @teardown_tester
Downscale service manually
Given
I create a project with ID "eta5"
And
I install a "WeDeploy Hosting" service with id "hosting1" for the project "eta5"
And
I scale up "hosting1-eta5" by 2 instances using api
And
I should see 2 instances in the Scaled Instances section
When
I click the "Manual Downscale" button
And
I select 1 from the downscale instances dropdown
And
I click the "Downscale Service" button
Then
I should see the notification
The instances were removed successfully
And
I should see 1 instance in the Scaled Instances section
  • @skip
Memory usage alert triggers auto scaling
Given
I create a project with ID "eta6"
And
I install a "WeDeploy Data" service with id "data1" for the project "eta6"
And
I enable auto scaling for "data1-eta6"
And
I visit "/projects/eta6/services/data1/scale"
And
I should see the text "No Scaled Instances Yet"
When
I go to the alerts page
And
I should see the following alert in "eta6" card
The data1 service exceeded 20% of its allocated Memory
And
I visit "/projects/eta6/services/data1/scale"
Then
I should see in the Auto Scaling section
Instances in Use 20% 2 of 10 instances
And
I should see 1 instance in the Scaled Instances section
And
I go to the alerts page
And
I should see the following alerts in "eta6" card
The data1 service autoscaled from 1 to 2 instances

Last published over 3 years ago by Christie Yoo.