Skip to content

Commit

Permalink
Fix codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Jul 11, 2024
1 parent 7a544e1 commit bcbe6a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source $current_dir/../support/test_helpers.sh
scenario=$current_dir/../../scenarios/zamtel_inbound.xml

log_file="zamtel_inbound_*_messages.log"
rm -f $log_file
rm -f "$log_file"

reset_db
create_load_balancer_entry "gwalt" "5080"
Expand All @@ -22,11 +22,11 @@ sipp -sf $scenario public_gateway:5080 -s 7888 -m 1 -trace_msg > /dev/null
reset_db

# Assert correct IP in SDP
if ! assert_in_file $log_file "c=IN IP4 18.141.245.230"; then
if ! assert_in_file "$log_file" "c=IN IP4 18.141.245.230"; then
exit 1
fi

# Assert correct Port in RR
if ! assert_in_file $log_file "Record-Route: <sip:$public_gateway:5080"; then
if ! assert_in_file "$log_file" "Record-Route: <sip:$public_gateway:5080"; then
exit 1
fi
6 changes: 3 additions & 3 deletions components/testing/tests/public_gateway/inbound_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source $current_dir/../support/test_helpers.sh
scenario=$current_dir/../../scenarios/smart_inbound.xml

log_file="smart_inbound_*_messages.log"
rm -f $log_file
rm -f "$log_file"

media_server="$(dig +short freeswitch)"
public_gateway="$(dig +short public_gateway)"
Expand All @@ -24,11 +24,11 @@ sipp -sf $scenario public_gateway:5060 -s 1234 -m 1 -trace_msg > /dev/null
reset_db

# Assert correct IP in SDP
if ! assert_in_file $log_file "c=IN IP4 $media_server"; then
if ! assert_in_file "$log_file" "c=IN IP4 $media_server"; then
exit 1
fi

# Assert correct Port in RR
if ! assert_in_file $log_file "Record-Route: <sip:$public_gateway:5060"; then
if ! assert_in_file "$log_file" "Record-Route: <sip:$public_gateway:5060"; then
exit 1
fi

0 comments on commit bcbe6a2

Please sign in to comment.