From 025afbca5cbb37f5b3144d32c219fa609f3fbc04 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 16 Apr 2025 10:51:53 +0200 Subject: [PATCH] MT#62615 ngcp-dlgcnt-check: fix filtering dlglist values from results output was changed to json but the regex for filtering list: values was not updated * migrate fixtures to json Change-Id: Ifa18e87ef935dae8e8fab75095591646101c06c1 --- scripts/ngcp-dlgcnt-check | 2 +- tests/fixtures/koredis.redis | 10 ++++++---- tests/fixtures/okredis.redis | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/ngcp-dlgcnt-check b/scripts/ngcp-dlgcnt-check index 620e145..56da625 100755 --- a/scripts/ngcp-dlgcnt-check +++ b/scripts/ngcp-dlgcnt-check @@ -44,7 +44,7 @@ ngcp-kamctl proxy fifo dlg.list | awk '/"call-id":/ { print $NF}' > "$KAMAILIO_D # 'lists:' belongs to dlglist REDIS_CALLIDS_FILTER=$(mktemp) -grep -E -v '^list:' "$REDIS_CALLIDS" > "$REDIS_CALLIDS_FILTER" || true +grep -E -v '^\s+"list:' "$REDIS_CALLIDS" > "$REDIS_CALLIDS_FILTER" || true while read -r i ; do if [[ "$i" == '[' || "$i" == ']' || "$i" == "Database is empty" ]]; then diff --git a/tests/fixtures/koredis.redis b/tests/fixtures/koredis.redis index e9d3977..4636993 100644 --- a/tests/fixtures/koredis.redis +++ b/tests/fixtures/koredis.redis @@ -1,4 +1,6 @@ -WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5080 -f81f8a33-2dbd-1235-018c-0090fb484030:5060-pbx_1 -f81f8a33-2dbd-1235-018c-0090fb484030:5060 -list:f81f8a33-2dbd-1235-018c-0090fb484030:5060 +[ + "WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5080", + "f81f8a33-2dbd-1235-018c-0090fb484030:5060-pbx_1", + "f81f8a33-2dbd-1235-018c-0090fb484030:5060", + "list:f81f8a33-2dbd-1235-018c-0090fb484030:5060" +] diff --git a/tests/fixtures/okredis.redis b/tests/fixtures/okredis.redis index f597318..0ce3896 100644 --- a/tests/fixtures/okredis.redis +++ b/tests/fixtures/okredis.redis @@ -1,3 +1,5 @@ -WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5060-pbx_1 -WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5060 -list:WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5060 +[ + "WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5060-pbx_1", + "WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5060", + "list:WSGH2SB52VHYLPX4VQQ6N4B2ZM@81.201.82.107:5060" +]