Conflicts:
	engine/loader_csv_test.go
	engine/loader_it_test.go
	engine/tp_reader.go
This commit is contained in:
TeoV
2017-09-06 10:56:40 -04:00
9 changed files with 134 additions and 31 deletions

View File

@@ -265,7 +265,11 @@ cgrates.org,mas,true,another,value,10
*out,cgrates.org,call,remo,remo,*any,*rating,Subject,remo,minu,10
*out,cgrates.org,call,remo,remo,*any,*rating,Account,remo,minu,10
`
<<<<<<< HEAD
resProfiles = `
=======
resCfgs = `
>>>>>>> dd8afa24867e3d532c7a2b81fc8070aceec07dad
#Id[0],FilterType[1],FilterFieldName[2],FilterFieldValues[3],ActivationInterval[4],TTL[5],Limit[6],AllocationMessage[7],Weight[8],Thresholds[9]
ResGroup21,*string,HdrAccount,1001;1002,2014-07-29T15:00:00Z,1s,2,call,true,true,10,
ResGroup21,*string_prefix,HdrDestination,10;20,,,,,,,,
@@ -286,7 +290,11 @@ var csvr *TpReader
func init() {
csvr = NewTpReader(dataStorage, NewStringCSVStorage(',', destinations, timings, rates, destinationRates, ratingPlans, ratingProfiles,
<<<<<<< HEAD
sharedGroups, lcrs, actions, actionPlans, actionTriggers, accountActions, derivedCharges, cdrStats, users, aliases, resProfiles, stats, thresholds), testTPID, "")
=======
sharedGroups, lcrs, actions, actionPlans, actionTriggers, accountActions, derivedCharges, cdrStats, users, aliases, resCfgs, stats, thresholds), testTPID, "")
>>>>>>> dd8afa24867e3d532c7a2b81fc8070aceec07dad
if err := csvr.LoadDestinations(); err != nil {
log.Print("error in LoadDestinations:", err)
}
@@ -1388,8 +1396,13 @@ func TestLoadReverseAliases(t *testing.T) {
}
}
<<<<<<< HEAD
func TestLoadResourceProfiles(t *testing.T) {
eResProfiles := map[string]*utils.TPResource{
=======
func TestLoadResources(t *testing.T) {
eResCfgs := map[string]*utils.TPResource{
>>>>>>> dd8afa24867e3d532c7a2b81fc8070aceec07dad
"ResGroup21": &utils.TPResource{
TPid: testTPID,
ID: "ResGroup21",
@@ -1423,10 +1436,17 @@ func TestLoadResourceProfiles(t *testing.T) {
Limit: "2",
},
}
<<<<<<< HEAD
if len(csvr.resProfiles) != len(eResProfiles) {
t.Error("Failed to load resourceProfiles: ", len(csvr.resProfiles))
} else if !reflect.DeepEqual(eResProfiles["ResGroup22"], csvr.resProfiles["ResGroup22"]) {
t.Errorf("Expecting: %+v, received: %+v", eResProfiles["ResGroup22"], csvr.resProfiles["ResGroup22"])
=======
if len(csvr.resCfgs) != len(eResCfgs) {
t.Error("Failed to load resourcelimits: ", len(csvr.resCfgs))
} else if !reflect.DeepEqual(eResCfgs["ResGroup22"], csvr.resCfgs["ResGroup22"]) {
t.Errorf("Expecting: %+v, received: %+v", eResCfgs["ResGroup22"], csvr.resCfgs["ResGroup22"])
>>>>>>> dd8afa24867e3d532c7a2b81fc8070aceec07dad
}
}