mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 06:09:53 +05:00
Add tests for *remote_host in diameter
This commit is contained in:
committed by
Dan Christian Bogos
parent
ea8562ba4b
commit
edf16b75da
@@ -22,6 +22,7 @@ import (
|
||||
"net/rpc"
|
||||
"net/rpc/jsonrpc"
|
||||
"path"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -645,6 +646,10 @@ func testDiamItCCRTerminate(t *testing.T) {
|
||||
if cdrs[0].Usage != 550*time.Second {
|
||||
t.Errorf("Unexpected Usage CDR: %+v", cdrs[0])
|
||||
}
|
||||
|
||||
if !strings.Contains(cdrs[0].OriginHost, "127.0.0.1") {
|
||||
t.Errorf("Unexpected OriginHost CDR: %+v", cdrs[0])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice"},
|
||||
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
||||
"value": "~*req.Session-Id", "mandatory": true},
|
||||
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "Account", "field_id": "Account", "type": "*constant", "value": "*attributes"},
|
||||
@@ -40,6 +42,8 @@
|
||||
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice"},
|
||||
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
||||
"value": "~*req.Session-Id", "mandatory": true},
|
||||
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "Account", "field_id": "Account", "type": "*constant", "value": "*attributes"},
|
||||
@@ -70,6 +74,8 @@
|
||||
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice"},
|
||||
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
||||
"value": "~*req.Session-Id", "mandatory": true},
|
||||
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Account", "field_id": "Account", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice"},
|
||||
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
||||
"value": "~*req.Session-Id", "mandatory": true},
|
||||
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "Account", "field_id": "Account", "type": "*constant", "value": "*attributes"},
|
||||
@@ -40,6 +42,8 @@
|
||||
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice"},
|
||||
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
||||
"value": "~*req.Session-Id", "mandatory": true},
|
||||
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "Account", "field_id": "Account", "type": "*constant", "value": "*attributes"},
|
||||
@@ -70,6 +74,8 @@
|
||||
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice"},
|
||||
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
||||
"value": "~*req.Session-Id", "mandatory": true},
|
||||
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Account", "field_id": "Account", "type": "*constant", "value": "*attributes"},
|
||||
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
|
||||
|
||||
Reference in New Issue
Block a user