File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ declare -A CHECKS=(
21
21
[" systemd-strict" ]=" 1"
22
22
[" mount-home" ]=" 1"
23
23
[" containerd-user" ]=" 1"
24
+ [" pause" ]=" 1"
24
25
[" restart" ]=" 1"
25
26
[" port-forwards" ]=" 1"
26
27
[" vmnet" ]=" "
@@ -259,6 +260,28 @@ if [[ -n ${CHECKS["disk"]} ]]; then
259
260
set +x
260
261
fi
261
262
263
+ if [[ -n ${CHECKS["pause"]} ]]; then
264
+ INFO " Suspending \" $NAME \" "
265
+ limactl suspend " $NAME "
266
+
267
+ got=$( limactl ls --format ' {{.Status}}' " $NAME " )
268
+ expected=" Paused"
269
+ if [ " $got " != " $expected " ]; then
270
+ ERROR " suspend status: expected=${expected} got=${got} "
271
+ exit 1
272
+ fi
273
+
274
+ INFO " Resuming \" $NAME \" "
275
+ limactl resume " $NAME "
276
+
277
+ got=$( limactl ls --format ' {{.Status}}' " $NAME " )
278
+ expected=" Running"
279
+ if [ " $got " != " $expected " ]; then
280
+ ERROR " resume status: expected=${expected} got=${got} "
281
+ exit 1
282
+ fi
283
+ fi
284
+
262
285
if [[ -n ${CHECKS["restart"]} ]]; then
263
286
INFO " Create file in the guest home directory and verify that it still exists after a restart"
264
287
# shellcheck disable=SC2016
You can’t perform that action at this time.
0 commit comments