Skip to content

Commit 8d7b16d

Browse files
authored
Add patching objects with tags tests (#60)
Issue #, if available: Need to validate that tags could be added together with modification of other fields. Description of changes: Add changes of tags together while modifying other fields. Remove a redundant test step. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5990800 commit 8d7b16d

File tree

5 files changed

+55
-12
lines changed

5 files changed

+55
-12
lines changed

test/e2e/scenarios/ACL/acl_create_update.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ steps:
8585
UserNames:
8686
- userone$RANDOM_SUFFIX
8787
- usertwo$RANDOM_SUFFIX
88-
- id: "UPDATE_ACL"
89-
description: "Update userNames"
88+
- id: "UPDATE_ACL_WITH_USERNAMES_AND_TAGS"
89+
description: "Update userNames and tags"
9090
patch:
9191
apiVersion: $CRD_GROUP/$CRD_VERSION
9292
kind: ACL
@@ -95,6 +95,9 @@ steps:
9595
spec:
9696
userNames:
9797
- userone$RANDOM_SUFFIX
98+
tags:
99+
- key: "test_key_1"
100+
value: "test_value_1"
98101
wait:
99102
status:
100103
conditions:
@@ -105,9 +108,15 @@ steps:
105108
spec:
106109
userNames:
107110
- userone$RANDOM_SUFFIX
111+
tags:
112+
- key: "test_key_1"
113+
value: "test_value_1"
108114
expect_aws:
109115
UserNames:
110116
- userone$RANDOM_SUFFIX
117+
Tags:
118+
- Key: "test_key_1"
119+
Value: "test_value_1"
111120
- id: "ACL_DELETE"
112121
description: "Delete ACL"
113122
delete:

test/e2e/scenarios/Cluster/cluster_create_update.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,18 @@ steps:
125125
name: acl$RANDOM_SUFFIX
126126
expect_aws:
127127
Name: acl$RANDOM_SUFFIX
128-
- id: "UPDATE_ACL"
129-
description: "Update ACL"
128+
- id: "UPDATE_ACL_AND_TAGS"
129+
description: "Update ACL and tags"
130130
patch:
131131
apiVersion: $CRD_GROUP/$CRD_VERSION
132132
kind: Cluster
133133
metadata:
134134
name: cluster$RANDOM_SUFFIX
135135
spec:
136136
aclName: acl$RANDOM_SUFFIX
137+
tags:
138+
- key: "test_key_1"
139+
value: "test_value_1"
137140
wait:
138141
status:
139142
conditions:
@@ -143,8 +146,14 @@ steps:
143146
expect_k8s:
144147
spec:
145148
aclName: acl$RANDOM_SUFFIX
149+
tags:
150+
- key: "test_key_1"
151+
value: "test_value_1"
146152
expect_aws:
147153
ACLName: acl$RANDOM_SUFFIX
154+
Tags:
155+
- Key: "test_key_1"
156+
Value: "test_value_1"
148157
- id: "PG_INITIAL_CREATE"
149158
description: "PG with activerehashing as no"
150159
create:

test/e2e/scenarios/ParameterGroup/pg_update_with_params_and_reset.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ steps:
167167
Value: "3001"
168168
- Name: lazyfree-lazy-eviction
169169
Value: "yes"
170-
- id: "PG_UPDATE_SECOND_HALF_PARAMETERS"
171-
description: "Update rest 19 parameters at the same time"
170+
- id: "PG_UPDATE_SECOND_HALF_PARAMETERS_AND_TAGS"
171+
description: "Update rest 19 parameters and tags at the same time"
172172
patch:
173173
spec:
174174
parameterNameValues:
@@ -210,6 +210,9 @@ steps:
210210
parameterValue: "127"
211211
- parameterName: zset-max-ziplist-value
212212
parameterValue: "63"
213+
tags:
214+
- key: "test_key_1"
215+
value: "test_value_1"
213216
wait:
214217
status:
215218
conditions:
@@ -257,6 +260,9 @@ steps:
257260
parameterValue: "127"
258261
- parameterName: zset-max-ziplist-value
259262
parameterValue: "63"
263+
tags:
264+
- key: "test_key_1"
265+
value: "test_value_1"
260266
expect_aws:
261267
Parameters:
262268
- Name: lazyfree-lazy-expire
@@ -297,6 +303,9 @@ steps:
297303
Value: "127"
298304
- Name: zset-max-ziplist-value
299305
Value: "63"
306+
Tags:
307+
- Key: "test_key_1"
308+
Value: "test_value_1"
300309
- id: "PG_RESET"
301310
description: "Update parameterNameValues to empty list"
302311
patch:

test/e2e/scenarios/SubnetGroup/subnetgroup_create_update.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ steps:
5050
description: Subnet group update
5151
expect_aws:
5252
Description: Subnet group update
53-
- id: "UPDATE_SUBNET"
53+
- id: "UPDATE_SUBNETS"
5454
description: "Update SubnetGroup SubnetIds"
5555
patch:
5656
spec:
@@ -69,14 +69,17 @@ steps:
6969
expect_aws:
7070
Subnets:
7171
- Identifier: $SUBNET2
72-
- id: "UPDATE_SUBNET_DESCRIPTION"
73-
description: "Update SubnetGroup SubnetIds and Description"
72+
- id: "UPDATE_SUBNETS_DESCRIPTION_AND_TAGS"
73+
description: "Update SubnetGroup SubnetIds, Description, and Tags"
7474
patch:
7575
spec:
7676
description: Subnet group update description and subnets
7777
subnetIDs:
7878
- $SUBNET1
7979
- $SUBNET2
80+
tags:
81+
- key: "test_key_1"
82+
value: "test_value_1"
8083
wait:
8184
status:
8285
conditions:
@@ -89,6 +92,9 @@ steps:
8992
subnetIDs:
9093
- $SUBNET1
9194
- $SUBNET2
95+
tags:
96+
- key: "test_key_1"
97+
value: "test_value_1"
9298
expect_aws:
9399
Description: Subnet group update description and subnets
94100
Subnets:

test/e2e/scenarios/User/user_create_update.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: "USER_CREATE_UPDATE"
2-
description: "In this test we create User and Update"
2+
description: "In this test we create User and update it"
33
#marks:
44
# - slow
55
# - blocked
@@ -54,15 +54,18 @@ steps:
5454
accessString: off resetchannels -@all +get
5555
expect_aws:
5656
AccessString: off resetchannels -@all +get
57-
- id: "USER_UPDATE_PASSWORD"
58-
description: "Update Password"
57+
- id: "USER_UPDATE_PASSWORD_AND_TAGS"
58+
description: "Update Password and Tags"
5959
patch:
6060
spec:
6161
authenticationMode:
6262
type_: password
6363
passwords:
6464
- key: password
6565
name: $SECRET2
66+
tags:
67+
- key: "test_key_1"
68+
value: "test_value_1"
6669
wait:
6770
status:
6871
conditions:
@@ -76,6 +79,13 @@ steps:
7679
passwords:
7780
- key: password
7881
name: $SECRET2
82+
tags:
83+
- key: "test_key_1"
84+
value: "test_value_1"
85+
expect_aws:
86+
Tags:
87+
- Key: "test_key_1"
88+
Value: "test_value_1"
7989
- id: "USER_UPDATE_ACCESS_STRING_AND_SECRET"
8090
description: "Update Secret and AccessString"
8191
patch:

0 commit comments

Comments
 (0)