Add tests for *sipcid case from ParseAttribute function

This commit is contained in:
ionutboangiu
2021-07-12 11:01:44 +03:00
committed by Dan Christian Bogos
parent 86037c07ac
commit b18467fdc3
3 changed files with 57 additions and 9 deletions

View File

@@ -547,11 +547,11 @@ func ParseAttribute(dp utils.DataProvider, attrType, path string, value config.R
}
return usedCCTime + time.Duration(debitItvl.Nanoseconds()*reqNr), nil
case utils.MetaSIPCID:
values := make([]string, 1, len(value))
if len(value) < 1 {
return nil, fmt.Errorf("invalid number of arguments <%s> to %s",
utils.ToJSON(value), utils.MetaSIPCID)
}
values := make([]string, 1, len(value))
if values[0], err = value[0].ParseDataProvider(dp); err != nil {
return
}