Skip to content

Commit

Permalink
tests/NIT/nit.sh: verify that port number is suffixed by nut-scanner …
Browse files Browse the repository at this point in the history
…when needed [networkupstools#1815]
  • Loading branch information
jimklimov committed Jan 16, 2023
1 parent 2f34c23 commit 0716d27
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/NIT/nit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,13 @@ testcase_sandbox_nutscanner_list() {
&& echo "$CMDOUT" | grep 'port = "dummy@' \
|| return

if [ "${NUT_PORT}" = 3493 ] || [ x"$NUT_PORT" = x ]; then
echo "Note: not testing for suffixed port number" >&2
else
echo "$CMDOUT" | grep -E 'dummy@.*'":${NUT_PORT}" \
|| return
fi

if [ x"${TOP_SRCDIR}" = x ]; then
echo "Note: only testing one dummy device" >&2
else
Expand Down

0 comments on commit 0716d27

Please sign in to comment.