Skip to content

Commit a9cde7a

Browse files
Adding BDD tests for locked instance groups
1 parent 609828e commit a9cde7a

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

test-bdd/features/01_create.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Feature: CRUD Create
1717
And I create a resource instance-group-launch-template-mixed.yaml
1818
And I create a resource manager-configmap.yaml
1919
And I create a resource instance-group-gitops.yaml
20+
And I create a resource instance-group-locked.yaml
2021

2122
Scenario: Create an instance-group with rollingUpdate strategy
2223
Given an EKS cluster
@@ -88,3 +89,11 @@ Feature: CRUD Create
8889
And the resource should converge to selector .status.currentState=ready
8990
And the resource condition NodesReady should be true
9091
And 2 nodes should be ready
92+
93+
Scenario: Create an instance-group with latest ami
94+
Given an EKS cluster
95+
When I create a resource instance-group-locked.yaml
96+
Then the resource should be created
97+
And the resource should converge to selector .status.currentState=ready
98+
And the resource condition NodesReady should be true
99+
And 2 nodes should be ready

test-bdd/features/03_upgrade.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ Feature: CRUD Upgrade
6161
And the resource should converge to selector .status.currentState=ready
6262
And the resource condition NodesReady should be true
6363
And 3 nodes should be ready
64+
65+
Scenario: Lock an instance-group
66+
Given an EKS cluster
67+
When I update a resource instance-group-locked.yaml with .metadata.annotation[instancemgr.keikoproj.io/lock-upgrades] set to true
68+
Then I update a resource instance-group-locked.yaml with .spec.eks.configuration.instanceType set to t2.medium
69+
Then the resource should converge to selector .status.currentState=locked

test-bdd/features/04_delete.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Feature: CRUD Delete
1414
And I delete a resource instance-group-managed.yaml
1515
And I delete a resource instance-group-fargate.yaml
1616
And I delete a resource instance-group-gitops.yaml
17+
And I delete a resource instance-group-locked.yaml
1718

1819
Scenario: Delete an instance-group with rollingUpdate strategy
1920
Given an EKS cluster
@@ -49,6 +50,11 @@ Feature: CRUD Delete
4950
Given an EKS cluster
5051
Then I delete a resource instance-group-fargate.yaml
5152
And the resource should be deleted
53+
54+
Scenario: Delete a locked profile
55+
Given an EKS cluster
56+
Then I delete a resource instance-group-locked.yaml
57+
And the resource should be delete
5258

5359
Scenario: Delete an instance-group with shortened resource
5460
Given an EKS cluster

0 commit comments

Comments
 (0)