diff options
author | JP Ungaretti <git@jungaretti.com> | 2023-03-01 22:19:02 +0300 |
---|---|---|
committer | JP Ungaretti <git@jungaretti.com> | 2023-03-01 22:19:02 +0300 |
commit | dcbd98f08ea034f90c06946af95387d55550efcb (patch) | |
tree | 9b74e75b36c814acb2b45532369538171368bb55 /test | |
parent | ca6f581c8f1351886c6d802a287a7ec4e4c98f87 (diff) |
Run project tests as non-root user
Diffstat (limited to 'test')
-rw-r--r-- | test/dotnet/build_dotnet_7.sh | 2 | ||||
-rw-r--r-- | test/dotnet/run_dotnet_7.sh | 2 | ||||
-rw-r--r-- | test/dotnet/scenarios.json | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/test/dotnet/build_dotnet_7.sh b/test/dotnet/build_dotnet_7.sh index 62e950c..813282c 100644 --- a/test/dotnet/build_dotnet_7.sh +++ b/test/dotnet/build_dotnet_7.sh @@ -4,6 +4,8 @@ set -e source dev-container-features-test-lib +check "non-root user" test "$(id -u)" -ne 0 + pushd example_project check "dotnet restore" dotnet restore check "dotnet build" dotnet build diff --git a/test/dotnet/run_dotnet_7.sh b/test/dotnet/run_dotnet_7.sh index ea66bd4..cde1d9d 100644 --- a/test/dotnet/run_dotnet_7.sh +++ b/test/dotnet/run_dotnet_7.sh @@ -4,6 +4,8 @@ set -e source dev-container-features-test-lib +check "non-root user" test "$(id -u)" -ne 0 + pushd example_project check "dotnet run" bash -c "dotnet run | grep 'Inception'" diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json index f4127f2..45a268f 100644 --- a/test/dotnet/scenarios.json +++ b/test/dotnet/scenarios.json @@ -58,7 +58,8 @@ } }, "build_dotnet_7": { - "image": "ubuntu:jammy", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "remoteUser": "vscode", "features": { "dotnet": { "version": "7" @@ -66,7 +67,8 @@ } }, "run_dotnet_7": { - "image": "ubuntu:jammy", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "remoteUser": "vscode", "features": { "dotnet": { "version": "7" |