Merge pull request #1155 from ogayot/fix-run-tests

Fix language packs detection in integration tests
This commit is contained in:
Dan Bungert 2022-01-07 15:26:42 -07:00 committed by GitHub
commit 2a37cf5efb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -89,8 +89,9 @@ validate () {
echo "user not assigned with the expected group sudo"
exit 1
fi
lang="$(grep -Eo 'LANG="([^.@ _]+)' .subiquity/etc/default/locale | cut -d \" -f 2)"
if [ -z "$( ls .subiquity/var/cache/apt/archives/) | grep $lang" ] ; then
# Extract value of the LANG variable from etc/default/locale (with or without quotes)
lang="$(grep -Eo 'LANG=([^.@ _]+)' .subiquity/etc/default/locale | cut -d= -f 2- | cut -d\" -f 2-)"
if ! ls .subiquity/var/cache/apt/archives/ | grep --fixed-strings --quiet -- "$lang"; then
echo "expected $lang language packs in directory var/cache/apt/archives/"
exit 1
fi