Skip to content

Commit

Permalink
tests: Skip tests requiring trivial-httpd without it
Browse files Browse the repository at this point in the history
I think we just got by with this because our unit tests
were always run in an environment that had it...
  • Loading branch information
cgwalters committed Sep 19, 2023
1 parent 5a91481 commit c92a4c9
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fi
if test -z "${OSTREE_HTTPD:-}"; then
OSTREE_HTTPD="${test_builddir}/ostree-trivial-httpd"
if ! [ -x "${OSTREE_HTTPD}" ]; then
fatal "Failed to find ${OSTREE_HTTPD}"
OSTREE_HTTPD=
fi
fi

Expand Down
5 changes: 5 additions & 0 deletions tests/test-admin-gpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set -euo pipefail

. $(dirname $0)/libtest.sh

if test -z "${OSTREE_HTTPD}"; then
echo "1..0 #SKIP no ostree-trivial-httpd"
exit 0
fi

setup_os_repository_signed () {
mode=$1
shift
Expand Down
5 changes: 5 additions & 0 deletions tests/test-commit-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ if ! has_gpgme; then
exit 0
fi

if test -z "${OSTREE_HTTPD}"; then
echo "1..0 #SKIP no ostree-trivial-httpd"
exit 0
fi

echo "1..7"

keyid="472CDAFA"
Expand Down
5 changes: 5 additions & 0 deletions tests/test-pull-contenturl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set -euo pipefail

. $(dirname $0)/libtest.sh

if test -z "${OSTREE_HTTPD}"; then
echo "1..0 #SKIP no ostree-trivial-httpd"
exit 0
fi

echo "1..2"

COMMIT_SIGN=""
Expand Down
5 changes: 5 additions & 0 deletions tests/test-pull-metalink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set -euo pipefail

. $(dirname $0)/libtest.sh

if test -z "${OSTREE_HTTPD}"; then
echo "1..0 #SKIP no ostree-trivial-httpd"
exit 0
fi

setup_fake_remote_repo1 "archive"

echo '1..9'
Expand Down
5 changes: 5 additions & 0 deletions tests/test-pull-mirrorlist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set -euo pipefail

. $(dirname $0)/libtest.sh

if test -z "${OSTREE_HTTPD}"; then
echo "1..0 #SKIP no ostree-trivial-httpd"
exit 0
fi

echo "1..3"

setup_fake_remote_repo1 "archive"
Expand Down
5 changes: 5 additions & 0 deletions tests/test-pull-override-url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set -euo pipefail

. $(dirname $0)/libtest.sh

if test -z "${OSTREE_HTTPD}"; then
echo "1..0 #SKIP no ostree-trivial-httpd"
exit 0
fi

setup_fake_remote_repo1 "archive"

echo '1..1'
Expand Down

0 comments on commit c92a4c9

Please sign in to comment.