You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
688 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/bin/bash
echo "Тест получения названия MSVSphere ОС из ISO образа"
echo "=================================================="
echo ""
source ../../library/sh_lib.sh
check=0
ISO_IMAGES_URLS_FILE='files/msvsphereiso_url.txt'
EXPECTED_MESSAGE="Media is bootable.
Media is an installer for OS 'MSVSphere 9 (x86_64)'"
while read LINE; do
curl -LJs -r 0-1048576 -o img.iso $LINE
OUTPUT="$(/usr/bin/osinfo-detect img.iso 2>&1)"
[[ "$OUTPUT" == "$EXPECTED_MESSAGE" ]]
check=$(eq_is_success ${check} 0)
echo "RESULT: File: $LINE; Result: $check"
rm -f img.iso
done < $ISO_IMAGES_URLS_FILE
check_test_status ${check} "$0"
exit ${check}