From 0752a52b0c8ac76448666822938dce8f4d55bb69 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Tue, 1 Nov 2022 12:02:02 -0500 Subject: Nix feature (#228) --- test/nix/os-ubuntu.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 test/nix/os-ubuntu.sh (limited to 'test/nix/os-ubuntu.sh') diff --git a/test/nix/os-ubuntu.sh b/test/nix/os-ubuntu.sh new file mode 100755 index 0000000..fe2b978 --- /dev/null +++ b/test/nix/os-ubuntu.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +uid="$(id -u)" +echo "Current user UID is ${uid}." +nix_uid="$(stat /nix -c "%u")" +echo "/nix UID is ${nix_uid}." + +cat /etc/os-release + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. +check "nix-env" type nix-env +check "install" nix-env --install vim +check "vim_installed" type vim + +# Report result +# If any of the checks above exited with a non-zero exit code, the test will fail. +reportResults &2>1 \ No newline at end of file -- cgit v1.2.3