mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Adding extra fields test
This commit is contained in:
@@ -88,6 +88,14 @@ func TestCDRFields(t *testing.T) {
|
||||
if fsCdr.GetDuration() != 4 {
|
||||
t.Error("Error parsing cdr: ", fsCdr)
|
||||
}
|
||||
cfg.CDRSExtraFields = []string{"sip_user_agent","read_codec","write_codec"}
|
||||
extraFields := fsCdr.GetExtraFields()
|
||||
if len(extraFields)!=3 {
|
||||
t.Error("Error parsing extra fields: ", extraFields)
|
||||
}
|
||||
if extraFields["sip_user_agent"] != "Jitsi2.2.4603.9615Linux" {
|
||||
t.Error("Error parsing extra fields: ", extraFields)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user