From cf8f05b57c83f70fb1ec392b883b006c8686e4b3 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Fri, 25 Feb 2022 13:49:00 +0200 Subject: [PATCH] tests: Better implementation for ab30694 Don't remove the pre-existing mount-points from the blueprint b/c we still need to assert on those. Add `/tmp` and `/var/tmp` to exercise the case where mountpoints have matching suffixes. --- test/cases/filesystem.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/cases/filesystem.sh b/test/cases/filesystem.sh index 3463d4a05..4fd0a604a 100644 --- a/test/cases/filesystem.sh +++ b/test/cases/filesystem.sh @@ -162,6 +162,13 @@ size = "125 MiB" mountpoint = "/usr" size = 2147483648 +[[customizations.filesystem]] +mountpoint = "/tmp" +size = 131072000 + +[[customizations.filesystem]] +mountpoint = "/var/tmp" +size = 131072000 EOF build_image "$BLUEPRINT_FILE" rhel85-custom-filesystem qcow2 false @@ -175,7 +182,7 @@ greenprint "💬 Checking mountpoints" INFO="$(sudo /usr/libexec/osbuild-composer-test/image-info "${IMAGE_FILENAME}")" FAILED_MOUNTPOINTS=() -for MOUNTPOINT in '/' '/var' '/var/log' '/var/log/audit' '/usr'; do +for MOUNTPOINT in '/' '/var' '/var/log' '/var/log/audit' '/var/tmp' '/usr' '/tmp'; do EXISTS=$(jq -e --arg m "$MOUNTPOINT" 'any(.fstab[] | .[] == $m; .)' <<< "${INFO}") if $EXISTS; then greenprint "INFO: mountpoint $MOUNTPOINT exists"