@@ -148,6 +148,8 @@ DETIK_CLIENT_NAMESPACE="my-specific-namespace"
148
148
# Verify the number of PODS and services
149
149
verify " there are 2 pods named 'nginx'"
150
150
verify " there is 1 service named 'nginx'"
151
+ verify " there are less than 3 pods named 'nginx'"
152
+ verify " there are more than 1 pods named 'nginx'"
151
153
152
154
# Verify assertions on resources
153
155
verify " 'status' is 'running' for pods named 'nginx'"
@@ -157,6 +159,8 @@ verify "'.spec.ports[*].targetPort' is '8484' for services named 'nginx'"
157
159
# You can also specify a number of attempts
158
160
try " at most 5 times every 30s to get pods named 'nginx' and verify that 'status' is 'running'"
159
161
try " at most 5 times every 30s to get svc named 'nginx' and verify that '.spec.ports[*].targetPort' is '8484'"
162
+ try " at most 5 times every 30s to get deployment named 'nginx' and verify that 'status.currentReplicas' is more than '2'"
163
+ try " at most 5 times every 30s to get deployment named 'nginx' and verify that 'status.currentReplicas' is less than '4'"
160
164
161
165
# Long assertions can also be split over several lines
162
166
try " at most 5 times every 30s " \
@@ -283,8 +287,14 @@ Verify there are N resources of this type with this name pattern.
283
287
# Expecting 0 or 1 instance
284
288
verify " there is <0 or 1> <resource-type> named '<regular-expression>'"
285
289
286
- # Expecting more than 1 instance
290
+ # Expecting <number> instances
287
291
verify " there are <number> <resource-type> named '<regular-expression>'"
292
+
293
+ # Expecting more than <number> instances
294
+ verify " there are more than <number> <resource-type> named '<regular-expression>'"
295
+
296
+ # Expecting less than <number> instances
297
+ verify " there are less than <number> <resource-type> named '<regular-expression>'"
288
298
```
289
299
290
300
* resource-type* is one of the K8s ones (e.g. ` pods ` , ` po ` , ` services ` , ` svc ` ...).
0 commit comments