fixed more local tests

This commit is contained in:
Radu Ioan Fericean
2015-06-16 21:27:42 +03:00
parent fcb5fee2fc
commit e802e1eee7
5 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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())
}

View File

@@ -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 {

View File

@@ -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 {