We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a2341e commit c794d6eCopy full SHA for c794d6e
tests/t/bootc-cached.sh
@@ -0,0 +1,21 @@
1
+# SPDX-License-Identifier: GPL-2.0-or-later
2
+
3
+image="${TEST_IMAGES[fedora-bootc]}"
4
+user="${TEST_IMAGES_DEFAULT_USER[fedora-bootc]}"
5
6
+__drop_cached() {
7
+ mapfile -d '' -t __cached < <( __engine images --filter=label=crun-vm.from --format '{{.ID}}' --no-trunc )
8
+ if (( ${#__cached[@]} > 0 )); then
9
+ __engine rmi "${__cached[@]}"
10
+ fi
11
+}
12
13
+__test() {
14
+ __engine run --detach --name "$TEST_ID" "$image"
15
+ __engine exec "$TEST_ID" --as "$user"
16
+ __engine rm --force "$TEST_ID"
17
18
19
+__drop_cached
20
+__test
21
0 commit comments