summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/kolainst/destructive/basic-misc.sh23
-rwxr-xr-xtests/test-cli-extensions.sh3
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/kolainst/destructive/basic-misc.sh b/tests/kolainst/destructive/basic-misc.sh
new file mode 100644
index 00000000..6d14cc04
--- /dev/null
+++ b/tests/kolainst/destructive/basic-misc.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Random misc tests
+
+set -xeuo pipefail
+
+. ${KOLA_EXT_DATA}/libinsttest.sh
+
+echo "1..1"
+date
+
+# Test CLI extensions installed alongside the system
+extdir=/usr/libexec/libostree/ext/
+mkdir -p "${extdir}"
+ln -sr /usr/bin/env ${extdir}/ostree-env
+
+env TESTENV=foo ostree env > out.txt
+assert_file_has_content out.text TESTENV=foo
+rm -vf "${extdir}/ostree-env"
+echo "ok env"
+
+# End test
+date
diff --git a/tests/test-cli-extensions.sh b/tests/test-cli-extensions.sh
index 1fe9c037..e1916036 100755
--- a/tests/test-cli-extensions.sh
+++ b/tests/test-cli-extensions.sh
@@ -9,6 +9,9 @@ set -euo pipefail
echo '1..2'
+# Test CLI extensions via $PATH. If you change this, you may
+# also want to change the corresponding destructive version in
+# tests/kolainst/destructive/basic-misc.sh
mkdir -p ./localbin
ORIG_PATH="${PATH}"
export PATH="./localbin/:${PATH}"