diff --git a/engine/actions_test.go b/engine/actions_test.go index 5294fe058..53412aecf 100644 --- a/engine/actions_test.go +++ b/engine/actions_test.go @@ -1234,6 +1234,7 @@ func TestActionCdrLogParamsWithOverload(t *testing.T) { func TestActionSetDDestination(t *testing.T) { acc := &Account{BalanceMap: map[string]BalanceChain{utils.MONETARY: BalanceChain{&Balance{DestinationIds: utils.NewStringMap("*ddc_test")}}}} origD := &Destination{Id: "*ddc_test", Prefixes: []string{"111", "222"}} + alteredD := &Destination{Id: "*ddc_test", Prefixes: []string{"333", "444"}} ratingStorage.SetDestination(origD) ratingStorage.CacheRatingPrefixValues(map[string][]string{utils.DESTINATION_PREFIX: []string{utils.DESTINATION_PREFIX + "*ddc_test"}}) // check redis and cache @@ -1249,8 +1250,7 @@ func TestActionSetDDestination(t *testing.T) { t.Error("Error cacheing destination: ", x1) } setddestinations(acc, &StatsQueueTriggered{Metrics: map[string]float64{"333": 1, "444": 1}}, nil, nil) - alteredDest := &Destination{Id: "*ddc_test", Prefixes: []string{"333", "444"}} - if d, err := ratingStorage.GetDestination("*ddc_test"); err != nil || !reflect.DeepEqual(d, alteredDest) { + if d, err := ratingStorage.GetDestination("*ddc_test"); err != nil || !reflect.DeepEqual(d, alteredD) { t.Error("Error storing destination: ", d, err) } x1, err = cache2go.Get(utils.DESTINATION_PREFIX + "111") diff --git a/engine/history_test.go b/engine/history_test.go index 8484d1efd..3e51c5a4a 100644 --- a/engine/history_test.go +++ b/engine/history_test.go @@ -36,8 +36,7 @@ func TestHistoryRatinPlans(t *testing.T) { func TestHistoryDestinations(t *testing.T) { scribe := historyScribe.(*history.MockScribe) buf := scribe.GetBuffer(history.DESTINATIONS_FN) - expected := `[{"Id":"*ddc_test","Prefixes":["333","444"]}, -{"Id":"ALL","Prefixes":["49","41","43"]}, + expected := `{"Id":"ALL","Prefixes":["49","41","43"]}, {"Id":"DST_UK_Mobile_BIG5","Prefixes":["447956"]}, {"Id":"EU_LANDLINE","Prefixes":["444"]}, {"Id":"GERMANY","Prefixes":["49"]},