From 90678613b4713ff9ee636b79a80d995642383ce3 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 16 Oct 2025 12:30:04 -0400 Subject: [PATCH] MT#63317 add port usage test Change-Id: Ife1f8d54306155741984f2e5379a2b474fb5a25c --- t/auto-daemon-tests-bundle.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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();