mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixing integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
3a93dabad3
commit
3c45d8ba18
@@ -279,8 +279,8 @@ func testV1STSSetStatQueueProfile(t *testing.T) {
|
||||
ID: "TEST_PROFILE1",
|
||||
FilterIDs: []string{"FLTR_1"},
|
||||
ActivationInterval: &utils.ActivationInterval{
|
||||
ActivationTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC).Local(),
|
||||
ExpiryTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC).Local(),
|
||||
ActivationTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC),
|
||||
ExpiryTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
QueueLength: 10,
|
||||
TTL: time.Duration(10) * time.Second,
|
||||
|
||||
@@ -356,8 +356,8 @@ func testV1TSSetThresholdProfile(t *testing.T) {
|
||||
ID: "TEST_PROFILE1",
|
||||
FilterIDs: []string{"FilterID1", "FilterID2"},
|
||||
ActivationInterval: &utils.ActivationInterval{
|
||||
ActivationTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC).Local(),
|
||||
ExpiryTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC).Local(),
|
||||
ActivationTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC),
|
||||
ExpiryTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Recurrent: true,
|
||||
MinSleep: time.Duration(5 * time.Minute),
|
||||
|
||||
@@ -84,6 +84,9 @@ func (ev *CGREvent) FieldAsDuration(fldName string) (d time.Duration, err error)
|
||||
if d, canCast = iface.(time.Duration); canCast {
|
||||
return
|
||||
}
|
||||
if f, canCast := iface.(float64); canCast {
|
||||
return time.Duration(int64(f)), nil
|
||||
}
|
||||
s, canCast := iface.(string)
|
||||
if !canCast {
|
||||
err = fmt.Errorf("cannot cast %s to string", fldName)
|
||||
|
||||
Reference in New Issue
Block a user