diff --git a/cmd/osbuild-image-tests/constants/constants.go b/cmd/osbuild-image-tests/constants/constants.go index 5b8f382f2..ced683233 100644 --- a/cmd/osbuild-image-tests/constants/constants.go +++ b/cmd/osbuild-image-tests/constants/constants.go @@ -21,7 +21,7 @@ func GetOsbuildCommand(store, outputDirectory string, exports []string) *exec.Cm func GetImageInfoCommand(imagePath string) *exec.Cmd { return exec.Command( - "/usr/libexec/osbuild-composer-test/image-info", + "osbuild-image-info", imagePath, ) } @@ -34,7 +34,7 @@ var TestPaths = struct { MetaData string AzureDeploymentTemplate string }{ - ImageInfo: "/usr/libexec/osbuild-composer-test/image-info", + ImageInfo: "osbuild-image-info", PrivateKey: "/usr/share/tests/osbuild-composer/keyring/id_rsa", TestCasesDirectory: "/usr/share/tests/osbuild-composer/manifests", UserData: "/usr/share/tests/osbuild-composer/cloud-init/user-data", diff --git a/test/cases/api/common/s3.sh b/test/cases/api/common/s3.sh index 2ad57e1fd..bd0f458d9 100644 --- a/test/cases/api/common/s3.sh +++ b/test/cases/api/common/s3.sh @@ -209,7 +209,7 @@ function verifyDisk() { greenprint "Verifying contents of ${filename}" infofile="${filename}-info.json" - sudo /usr/libexec/osbuild-composer-test/image-info "${filename}" | tee "${infofile}" > /dev/null + sudo osbuild-image-info "${filename}" | tee "${infofile}" > /dev/null # save image info to artifacts cp -v "${infofile}" "${ARTIFACTS}/image-info.json" diff --git a/test/cases/container-embedding.sh b/test/cases/container-embedding.sh index ed4a921cf..0386d5981 100755 --- a/test/cases/container-embedding.sh +++ b/test/cases/container-embedding.sh @@ -128,7 +128,7 @@ sudo composer-cli compose image "${COMPOSE_ID}" > /dev/null IMAGE_FILENAME="${COMPOSE_ID}-disk.qcow2" greenprint "💬 Checking that image exists" -INFO="$(sudo /usr/libexec/osbuild-composer-test/image-info "${IMAGE_FILENAME}")" +INFO="$(sudo osbuild-image-info "${IMAGE_FILENAME}")" IMAGE_ID="d4ee87dab8193afad523b1042b9d3f5ec887555a704e5aaec2876798ebb585a6" FEDORA_CONTAINER_EXISTS=$(jq -e --arg id "${IMAGE_ID}" 'any(."container-images" | select(. != null and .[].Id == $id); .)' <<< "${INFO}") diff --git a/test/cases/filesystem.sh b/test/cases/filesystem.sh index 8d8a889b0..860043385 100644 --- a/test/cases/filesystem.sh +++ b/test/cases/filesystem.sh @@ -36,10 +36,6 @@ function cleanup_on_exit() { } trap cleanup_on_exit EXIT -# Workaround the problem that 'image-info' can not read SELinux labels unknown to the host from the image -OSBUILD_LABEL=$(matchpathcon -n "$(type -p osbuild)") -sudo chcon "$OSBUILD_LABEL" /usr/libexec/osbuild-composer-test/image-info - # Build ostree image. build_image() { blueprint_file=$1 @@ -204,7 +200,7 @@ sudo composer-cli compose image "${COMPOSE_ID}" > /dev/null IMAGE_FILENAME="${COMPOSE_ID}-disk.qcow2" greenprint "💬 Checking mountpoints" -if ! INFO="$(sudo /usr/libexec/osbuild-composer-test/image-info "${IMAGE_FILENAME}")"; then +if ! INFO="$(sudo osbuild-image-info "${IMAGE_FILENAME}")"; then echo "ERROR image-info failed, show last few kernel message to debug" dmesg | tail -n10 exit 2 diff --git a/test/cases/image_tests.sh b/test/cases/image_tests.sh index 149bf2f56..4c230b62d 100755 --- a/test/cases/image_tests.sh +++ b/test/cases/image_tests.sh @@ -96,10 +96,6 @@ run_test_case () { # Change to the working directory. cd $WORKING_DIRECTORY -# Workaround the problem that 'image-info' can not read SELinux labels unknown to the host from the image -OSBUILD_LABEL=$(matchpathcon -n "$(type -p osbuild)") -sudo chcon "$OSBUILD_LABEL" /usr/libexec/osbuild-composer-test/image-info - # Run each test case. for TEST_CASE in $(get_test_cases); do run_test_case "$IMAGE_TEST_CASE_RUNNER" "$TEST_CASE" diff --git a/test/cases/regression-old-worker-new-composer.sh b/test/cases/regression-old-worker-new-composer.sh index 4aa6db0f3..9c8064df1 100644 --- a/test/cases/regression-old-worker-new-composer.sh +++ b/test/cases/regression-old-worker-new-composer.sh @@ -35,7 +35,6 @@ DESIRED_OSBUILD_COMMIT_SHA=$(curl -s "https://raw.githubusercontent.com/osbuild/ # Get commit hash of latest composer version, only used for verification. CURRENT_COMPOSER_VERSION=$(rpm -q --qf '%{version}\n' osbuild-composer) -VERIFICATION_COMPOSER_RPM="osbuild-composer-tests-$((CURRENT_COMPOSER_VERSION - 1))" COMPOSER_LATEST_TAG_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/ref/tags/v$((CURRENT_COMPOSER_VERSION-1))" | jq -r '.object.sha') COMPOSER_LATEST_COMMIT_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/tags/$COMPOSER_LATEST_TAG_SHA" | jq -r '.object.sha') @@ -398,8 +397,8 @@ setup_repo osbuild-composer "$COMPOSER_LATEST_COMMIT_SHA" 10 OSBUILD_GIT_COMMIT=$(cat Schutzfile | jq -r '.["'"${ID}-${VERSION_ID}"'"].dependencies.osbuild.commit') setup_repo osbuild "$OSBUILD_GIT_COMMIT" 10 -greenprint "Installing osbuild-composer-tests for image-info" -sudo dnf install -y $VERIFICATION_COMPOSER_RPM +greenprint "Installing osbuild-tools for osbuild-image-info" +sudo dnf install -y osbuild-tools curl "${S3_URL}" --output "${WORKDIR}/disk.qcow2" @@ -409,7 +408,7 @@ function verifyDisk() { greenprint "Verifying contents of ${filename}" infofile="${filename}-info.json" - sudo /usr/libexec/osbuild-composer-test/image-info "${filename}" | tee "${infofile}" > /dev/null + sudo osbuild-image-info "${filename}" | tee "${infofile}" > /dev/null # save image info to artifacts cp -v "${infofile}" "${ARTIFACTS}/image-info.json"