-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test scenario for sid/unstable and test for the
libssl3t64
pa…
…ckage
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
FAILED=() | ||
echoStderr() | ||
{ | ||
echo "$@" 1>&2 | ||
} | ||
|
||
endsWith() { | ||
[[ $1 = *$2 ]] && return 0 || return 1 | ||
} | ||
|
||
checkOSPackages() { | ||
LABEL=$1 | ||
shift | ||
echo -e "\n🧪 Testing $LABEL" | ||
if dpkg-query --show -f='${Package}: ${Version}\n' "$@"; then | ||
echo "✅ Passed!" | ||
return 0 | ||
else | ||
echoStderr "❌ $LABEL check failed." | ||
FAILED+=("$LABEL") | ||
return 1 | ||
fi | ||
} | ||
|
||
checkCommon() | ||
{ | ||
PACKAGE_LIST="libssl3t64" | ||
|
||
checkOSPackages "Confirm that libssl3t64 is installed" ${PACKAGE_LIST} | ||
} | ||
|
||
# Check that libssl3t64 is installed | ||
checkCommon | ||
|
||
# Definition specific tests | ||
. /etc/os-release | ||
check "non-root user" test "$(whoami)" = "devcontainer" | ||
check "release" endsWith "${PRETTY_NAME}" "sid" | ||
|
||
# Report result | ||
reportResults |