diff --git a/t/auto-daemon-tests-bundle.pl b/t/auto-daemon-tests-bundle.pl index bd63614ab..ef07b09ac 100755 --- a/t/auto-daemon-tests-bundle.pl +++ b/t/auto-daemon-tests-bundle.pl @@ -7,6 +7,7 @@ use NGCP::Rtpclient::SRTP; use NGCP::Rtpengine::AutoTest; use Test::More; use POSIX; +use JSON; autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 -i 2001:db8:4321::1 @@ -3353,5 +3354,20 @@ is($port_d, $port_dx, "same port"); +if ($ENV{RTPENGINE_EXTENDED_TESTS}) { + + $resp = rtpe_req('cli', 'cli', { body => 'list jsonstats' } ); + $resp = decode_json($resp->{response}); + + is($resp->{interfaces}[0]{name}, 'default', 'intf found'); + is($resp->{interfaces}[0]{address}, '203.0.113.1', 'address found'); + is($resp->{interfaces}[0]{ports}{used}, 192, 'port usage'); + is($resp->{interfaces}[1]{name}, 'default', 'intf found'); + is($resp->{interfaces}[1]{address}, '2001:db8:4321::1', 'address found'); + is($resp->{interfaces}[1]{ports}{used}, 4, 'port usage'); + +} + + #done_testing;NGCP::Rtpengine::AutoTest::terminate('f00');exit; done_testing();