Skip to content

Commit

Permalink
Adding BDD tests for locked instance groups
Browse files Browse the repository at this point in the history
  • Loading branch information
preflightsiren committed Sep 29, 2021
1 parent 609828e commit a9cde7a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test-bdd/features/01_create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Feature: CRUD Create
And I create a resource instance-group-launch-template-mixed.yaml
And I create a resource manager-configmap.yaml
And I create a resource instance-group-gitops.yaml
And I create a resource instance-group-locked.yaml

Scenario: Create an instance-group with rollingUpdate strategy
Given an EKS cluster
Expand Down Expand Up @@ -88,3 +89,11 @@ Feature: CRUD Create
And the resource should converge to selector .status.currentState=ready
And the resource condition NodesReady should be true
And 2 nodes should be ready

Scenario: Create an instance-group with latest ami
Given an EKS cluster
When I create a resource instance-group-locked.yaml
Then the resource should be created
And the resource should converge to selector .status.currentState=ready
And the resource condition NodesReady should be true
And 2 nodes should be ready
6 changes: 6 additions & 0 deletions test-bdd/features/03_upgrade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ Feature: CRUD Upgrade
And the resource should converge to selector .status.currentState=ready
And the resource condition NodesReady should be true
And 3 nodes should be ready

Scenario: Lock an instance-group
Given an EKS cluster
When I update a resource instance-group-locked.yaml with .metadata.annotation[instancemgr.keikoproj.io/lock-upgrades] set to true
Then I update a resource instance-group-locked.yaml with .spec.eks.configuration.instanceType set to t2.medium
Then the resource should converge to selector .status.currentState=locked
6 changes: 6 additions & 0 deletions test-bdd/features/04_delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: CRUD Delete
And I delete a resource instance-group-managed.yaml
And I delete a resource instance-group-fargate.yaml
And I delete a resource instance-group-gitops.yaml
And I delete a resource instance-group-locked.yaml

Scenario: Delete an instance-group with rollingUpdate strategy
Given an EKS cluster
Expand Down Expand Up @@ -49,6 +50,11 @@ Feature: CRUD Delete
Given an EKS cluster
Then I delete a resource instance-group-fargate.yaml
And the resource should be deleted

Scenario: Delete a locked profile
Given an EKS cluster
Then I delete a resource instance-group-locked.yaml
And the resource should be delete

Scenario: Delete an instance-group with shortened resource
Given an EKS cluster
Expand Down

0 comments on commit a9cde7a

Please sign in to comment.