diff options
author | Joseph Marrero Corchado <jmarrero@users.noreply.github.com> | 2022-01-11 21:01:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 21:01:20 -0500 |
commit | 6567d825252cfa4b1ebab1dd8c9043bc6f73e3d6 (patch) | |
tree | 694e214047806060e78340187779ee72b835828f /tests | |
parent | 7cc84819078aec6b9637b3ad29712ca3e2f8433e (diff) | |
parent | 998154f8ffc2f471bf4f3b59602332ba15ef6d07 (diff) | |
download | ostree-6567d825252cfa4b1ebab1dd8c9043bc6f73e3d6.tar.gz |
Merge pull request #2515 from cgwalters/cliwrap-lib
main: Also support CLI extensions in `/usr/libexec/libostree/ext`
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kolainst/destructive/basic-misc.sh | 23 | ||||
-rwxr-xr-x | tests/test-cli-extensions.sh | 3 |
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}" |