Skip to content

Commit 259d90d

Browse files
committed
testsuite: cover FLUX_IPADDR_INTERFACE
Problem: there is no test coverage for the FLUX_IPADDR_INTERFACE environment variable. Add a couple checks.
1 parent 20015bf commit 259d90d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/t0001-basic.t

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,17 @@ test_expect_success 'tbon.endpoint uses tcp:// if tbon.prefertcp is set' '
429429
flux getattr tbon.endpoint >endpoint2.out &&
430430
grep "^tcp" endpoint2.out
431431
'
432+
test_expect_success 'FLUX_IPADDR_INTERFACE=lo works' '
433+
FLUX_IPADDR_INTERFACE=lo flux start \
434+
${ARGS} -s2 -o,-Stbon.prefertcp=1 \
435+
flux getattr tbon.endpoint >endpoint3.out &&
436+
grep "127.0.0.1" endpoint3.out
437+
'
438+
test_expect_success 'FLUX_IPADDR_INTERFACE=badiface fails' '
439+
(export FLUX_IPADDR_INTERFACE=badiface; \
440+
test_expect_code 137 flux start \
441+
${ARGS} --test-exit-timeout=1s -s2 -o,-Stbon.prefertcp=1 true)
442+
'
432443
test_expect_success 'tbon.endpoint cannot be set' '
433444
test_must_fail flux start ${ARGS} -s2 \
434445
-o,--setattr=tbon.endpoint=ipc:///tmp/customflux /bin/true

0 commit comments

Comments
 (0)