diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-19 13:05:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 13:05:05 -0500 |
commit | 5e2fcf813d54980df00976a01fca571b7007ae16 (patch) | |
tree | 5bd9f9f190cc5b1c1fcb1278b34efd2126e8682c /test/apiv2/test-apiv2 | |
parent | 1c81b67341300853d7fe9b6568b247e579c34969 (diff) | |
parent | abcd2923960645d740f830d53a686e6ff270cf77 (diff) | |
download | podman-5e2fcf813d54980df00976a01fca571b7007ae16.tar.gz podman-5e2fcf813d54980df00976a01fca571b7007ae16.tar.bz2 podman-5e2fcf813d54980df00976a01fca571b7007ae16.zip |
Merge pull request #12925 from edsantiago/apiv2_logs
APIv2 tests: followup to recent log test
Diffstat (limited to 'test/apiv2/test-apiv2')
-rwxr-xr-x | test/apiv2/test-apiv2 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2 index 19e8c12d0..56280f04e 100755 --- a/test/apiv2/test-apiv2 +++ b/test/apiv2/test-apiv2 @@ -45,8 +45,14 @@ echo 0 >$failures_file # Where the tests live TESTS_DIR=$(realpath $(dirname $0)) +# As of 2021-11 podman has one external helper binary, rootlessport, needed +# for rootless networking. +if [[ -z "$CONTAINERS_HELPER_BINARY_DIR" ]]; then + export CONTAINERS_HELPER_BINARY_DIR=$(realpath ${TESTS_DIR}/../../bin) +fi + # Path to podman binary -PODMAN_BIN=${PODMAN:-${TESTS_DIR}/../../bin/podman} +PODMAN_BIN=${PODMAN:-${CONTAINERS_HELPER_BINARY_DIR}/podman} # Cleanup handlers clean_up_server() { @@ -289,7 +295,8 @@ function t() { output="[$(file --brief $WORKDIR/curl.result.out)]" echo "$output" >>$LOG elif [[ -e $WORKDIR/curl.result.out ]]; then - output=$(< $WORKDIR/curl.result.out) + # Output from /logs sometimes includes NULs. Strip them. + output=$(tr -d '\0' < $WORKDIR/curl.result.out) if [[ $content_type =~ application/json ]] && [[ $method != "HEAD" ]]; then jq . <<<"$output" >>$LOG |