mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Adding test making sure utils.InitAttrReloadCache does not produce nil items
This commit is contained in:
committed by
Dan Christian Bogos
parent
613a6e56a0
commit
d9af358ae9
@@ -194,3 +194,33 @@ func TestAppendToSMCostFilter(t *testing.T) {
|
||||
t.Errorf("Expected: %s ,received: %s ", ToJSON(expected), ToJSON(smfltr))
|
||||
}
|
||||
}
|
||||
|
||||
func TestInitAttrReloadCache(t *testing.T) {
|
||||
var expected AttrReloadCache
|
||||
expected.DestinationIDs = &[]string{}
|
||||
expected.ReverseDestinationIDs = &[]string{}
|
||||
expected.RatingPlanIDs = &[]string{}
|
||||
expected.RatingProfileIDs = &[]string{}
|
||||
expected.ActionIDs = &[]string{}
|
||||
expected.ActionPlanIDs = &[]string{}
|
||||
expected.AccountActionPlanIDs = &[]string{}
|
||||
expected.ActionTriggerIDs = &[]string{}
|
||||
expected.SharedGroupIDs = &[]string{}
|
||||
expected.ResourceProfileIDs = &[]string{}
|
||||
expected.ResourceIDs = &[]string{}
|
||||
expected.StatsQueueIDs = &[]string{}
|
||||
expected.StatsQueueProfileIDs = &[]string{}
|
||||
expected.ThresholdIDs = &[]string{}
|
||||
expected.ThresholdProfileIDs = &[]string{}
|
||||
expected.FilterIDs = &[]string{}
|
||||
expected.SupplierProfileIDs = &[]string{}
|
||||
expected.AttributeProfileIDs = &[]string{}
|
||||
expected.ChargerProfileIDs = &[]string{}
|
||||
expected.DispatcherProfileIDs = &[]string{}
|
||||
expected.DispatcherHostIDs = &[]string{}
|
||||
expected.DispatcherRoutesIDs = &[]string{}
|
||||
|
||||
if rcv := InitAttrReloadCache(); !reflect.DeepEqual(rcv, expected) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", expected, rcv)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user