mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
fixed more local tests
This commit is contained in:
@@ -45,7 +45,7 @@ func (self *ApierV1) AddRatingSubjectAliases(attrs AttrAddRatingSubjectAliases,
|
||||
}
|
||||
aliasesChanged = append(aliasesChanged, utils.RP_ALIAS_PREFIX+utils.RatingSubjectAliasKey(attrs.Tenant, alias))
|
||||
}
|
||||
if err := self.RatingDb.CachePrefixes(utils.ACC_ALIAS_PREFIX); err != nil {
|
||||
if err := self.RatingDb.CachePrefixes(utils.RP_ALIAS_PREFIX); err != nil {
|
||||
return utils.NewErrServerError(err)
|
||||
}
|
||||
*reply = utils.OK
|
||||
|
||||
@@ -825,7 +825,7 @@ func (self *ApierV1) LoadAccountActions(attrs utils.TPAccountActions, reply *str
|
||||
}
|
||||
// ToDo: Get the action keys loaded by dbReader so we reload only these in cache
|
||||
// Need to do it before scheduler otherwise actions to run will be unknown
|
||||
if err := self.RatingDb.CachePrefixes(utils.DERIVED_CHARGERS_CSV, utils.ACTION_PREFIX, utils.SHARED_GROUP_PREFIX, utils.ACC_ALIAS_PREFIX); err != nil {
|
||||
if err := self.RatingDb.CachePrefixes(utils.DERIVEDCHARGERS_PREFIX, utils.ACTION_PREFIX, utils.SHARED_GROUP_PREFIX, utils.ACC_ALIAS_PREFIX); err != nil {
|
||||
return err
|
||||
}
|
||||
if self.Sched != nil {
|
||||
|
||||
@@ -308,6 +308,7 @@ func TestLoadIndividualProfiles(t *testing.T) {
|
||||
for aaId := range aas {
|
||||
aa, _ := utils.NewTPAccountActionsFromKeyId(utils.TEST_SQL, loadId, aaId)
|
||||
maa := APItoModelAccountAction(aa)
|
||||
|
||||
if err := loader.LoadAccountActionsFiltered(maa); err != nil {
|
||||
t.Fatalf("Could not load account actions with id: %s, error: %s", aaId, err.Error())
|
||||
}
|
||||
|
||||
@@ -98,10 +98,9 @@ func (rs *RedisStorage) CachePrefixValues(prefixes map[string][]string) error {
|
||||
utils.RATING_PROFILE_PREFIX: []string{},
|
||||
utils.RP_ALIAS_PREFIX: []string{},
|
||||
utils.LCR_PREFIX: []string{},
|
||||
utils.DERIVEDCHARGERS_PREFIX: []string{},
|
||||
utils.ACTION_PREFIX: []string{},
|
||||
utils.SHARED_GROUP_PREFIX: []string{},
|
||||
utils.ACC_ALIAS_PREFIX: []string{},
|
||||
utils.DERIVEDCHARGERS_PREFIX: []string{}, utils.ACTION_PREFIX: []string{},
|
||||
utils.SHARED_GROUP_PREFIX: []string{},
|
||||
utils.ACC_ALIAS_PREFIX: []string{},
|
||||
}
|
||||
for prefix, ids := range prefixes {
|
||||
if _, found := pm[prefix]; !found {
|
||||
|
||||
@@ -814,7 +814,7 @@ func (tpr *TpReader) LoadAccountActionsFiltered(qriedAA *TpAccountAction) error
|
||||
acts[tag] = enacts
|
||||
}
|
||||
}
|
||||
// writee actions
|
||||
// write actions
|
||||
for k, as := range acts {
|
||||
err = tpr.ratingStorage.SetActions(k, as)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user