diff options
author | Mark Phippard <markphip@gmail.com> | 2022-12-19 19:25:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-19 19:25:32 +0300 |
commit | fede4055495a9d44efbb65848eb7799771d23f9b (patch) | |
tree | f1538e22ba38d63a038dd83830e09004db9e5999 | |
parent | 9af65a01c7052821daf7fbbf93e65698c9053f27 (diff) |
Add support for mariner (#344)
-rw-r--r-- | src/common-utils/main.sh | 2 | ||||
-rwxr-xr-x | test/common-utils/mariner.sh | 14 | ||||
-rw-r--r-- | test/common-utils/scenarios.json | 7 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/common-utils/main.sh b/src/common-utils/main.sh index 63f64ab..f0fedcf 100644 --- a/src/common-utils/main.sh +++ b/src/common-utils/main.sh @@ -289,7 +289,7 @@ chmod +x /etc/profile.d/00-restore-env.sh # Get an adjusted ID independant of distro variants if [ "${ID}" = "debian" ] || [ "${ID_LIKE}" = "debian" ]; then ADJUSTED_ID="debian" -elif [[ "${ID}" = "rhel" || "${ID}" = "fedora" || "${ID_LIKE}" = *"rhel"* || "${ID_LIKE}" = *"fedora"* ]]; then +elif [[ "${ID}" = "rhel" || "${ID}" = "fedora" || "${ID}" = "mariner" || "${ID_LIKE}" = *"rhel"* || "${ID_LIKE}" = *"fedora"* || "${ID_LIKE}" = *"mariner"* ]]; then ADJUSTED_ID="rhel" elif [ "${ID}" = "alpine" ]; then ADJUSTED_ID="alpine" diff --git a/test/common-utils/mariner.sh b/test/common-utils/mariner.sh new file mode 100755 index 0000000..ab6cb6e --- /dev/null +++ b/test/common-utils/mariner.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +. /etc/os-release +check "non-root user" test "$(whoami)" = "devcontainer" +check "distro" test "${ID}" = "mariner" + +# Report result +reportResults
\ No newline at end of file diff --git a/test/common-utils/scenarios.json b/test/common-utils/scenarios.json index 9b0bc85..bc1c784 100644 --- a/test/common-utils/scenarios.json +++ b/test/common-utils/scenarios.json @@ -62,6 +62,13 @@ "common-utils": {} } }, + "mariner": { + "image": "mcr.microsoft.com/cbl-mariner/base/core:2.0", + "remoteUser": "devcontainer", + "features": { + "common-utils": {} + } + }, "alpine": { "image": "alpine", "remoteUser": "devcontainer", |