From 567ce5564bdfccbe5bc6fda7a9f7d79a0d6ef2eb Mon Sep 17 00:00:00 2001 From: eitsupi <50911393+eitsupi@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:03:15 +0000 Subject: [PATCH] add more tests --- test/rstudio-server/daily.sh | 12 +++++++ test/rstudio-server/r-already-installed.sh | 13 ++++++++ test/rstudio-server/scenarios.json | 32 +++++++++++++++++++ test/rstudio-server/version-daily-specific.sh | 12 +++++++ test/rstudio-server/version-tag.sh | 12 +++++++ 5 files changed, 81 insertions(+) create mode 100755 test/rstudio-server/daily.sh create mode 100755 test/rstudio-server/r-already-installed.sh create mode 100644 test/rstudio-server/scenarios.json create mode 100755 test/rstudio-server/version-daily-specific.sh create mode 100755 test/rstudio-server/version-tag.sh diff --git a/test/rstudio-server/daily.sh b/test/rstudio-server/daily.sh new file mode 100755 index 0000000..4b365e7 --- /dev/null +++ b/test/rstudio-server/daily.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +# Feature-specific tests +check "version" bash -c 'rstudio-server version' + +# Report result +reportResults diff --git a/test/rstudio-server/r-already-installed.sh b/test/rstudio-server/r-already-installed.sh new file mode 100755 index 0000000..837ab7b --- /dev/null +++ b/test/rstudio-server/r-already-installed.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +# Feature-specific tests +check "R version" bash -c 'R --version | grep 4.3.0' +check "version" bash -c 'rstudio-server version' + +# Report result +reportResults diff --git a/test/rstudio-server/scenarios.json b/test/rstudio-server/scenarios.json new file mode 100644 index 0000000..777ec3e --- /dev/null +++ b/test/rstudio-server/scenarios.json @@ -0,0 +1,32 @@ +{ + "r-already-installed": { + "image": "rocker/r-ver:4.3.0", + "features": { + "rstudio-server": {} + } + }, + "version-tag": { + "image": "rocker/r-ver", + "features": { + "rstudio-server": { + "version": "2023.03.2+454" + } + } + }, + "daily": { + "image": "rocker/r-ver", + "features": { + "rstudio-server": { + "version": "daily" + } + } + }, + "version-daily-specific": { + "image": "rocker/r-ver", + "features": { + "rstudio-server": { + "version": "2023.09.0-daily+306" + } + } + } +} diff --git a/test/rstudio-server/version-daily-specific.sh b/test/rstudio-server/version-daily-specific.sh new file mode 100755 index 0000000..724a0fc --- /dev/null +++ b/test/rstudio-server/version-daily-specific.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +# Feature-specific tests +check "version" bash -c 'rstudio-server version | grep 2023.09.0' + +# Report result +reportResults diff --git a/test/rstudio-server/version-tag.sh b/test/rstudio-server/version-tag.sh new file mode 100755 index 0000000..59e036b --- /dev/null +++ b/test/rstudio-server/version-tag.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +# Feature-specific tests +check "version" bash -c 'rstudio-server version | grep 2023.03.2+454' + +# Report result +reportResults