Skip to content

Commit

Permalink
Add a test scenario for sid/unstable and test for the libssl3t64 pa…
Browse files Browse the repository at this point in the history
…ckage
  • Loading branch information
pxslip committed Oct 25, 2024
1 parent 616a55d commit d4abf5f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/common-utils/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
}
}
},
"sid": {
"image": "debian:sid",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"centos-7": {
"image": "centos:7",
"remoteUser": "devcontainer",
Expand Down
48 changes: 48 additions & 0 deletions test/common-utils/sid.sh
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

0 comments on commit d4abf5f

Please sign in to comment.