Fixes local_tests

This commit is contained in:
DanB
2014-08-01 17:30:22 +02:00
parent a096d97d94
commit 8d1be00962
6 changed files with 13 additions and 9 deletions

View File

@@ -1277,7 +1277,7 @@ func TestResetDataAfterLoadFromFolder(t *testing.T) {
t.Error("Calling ApierV1.ReloadCache got reply: ", reply)
}
var rcvStats *utils.CacheStats
expectedStats := &utils.CacheStats{Destinations: 4, RatingPlans: 3, RatingProfiles: 3, Actions: 3, DerivedChargers: 2}
expectedStats := &utils.CacheStats{Destinations: 4, RatingPlans: 3, RatingProfiles: 3, Actions: 4, DerivedChargers: 2}
var args utils.AttrCacheStats
if err := rater.Call("ApierV1.GetCacheStats", args, &rcvStats); err != nil {
t.Error("Got error on ApierV1.GetCacheStats: ", err.Error())

View File

@@ -26,5 +26,7 @@ cdr_out_dir =/tmp/cgrates/cdr/cdrc/out # Absolute path towards the directory wh
[mediator]
enabled = true # Starts Mediator service: <true|false>.
rater = internal # Address where to reach the Rater: <internal|x.y.z.y:1234>
cdrstats=

View File

@@ -19,6 +19,7 @@ export_dir = /tmp/cgrates/cdr/cdrexport/csv # Path where the exported CDRs will
[mediator]
enabled = true # Starts Mediator service: <true|false>.
rater = internal # Address where to reach the Rater: <internal|x.y.z.y:1234>
cdrstats =
[derived_charging]
run_ids = run2 # Identifiers of additional sessions control.

View File

@@ -1,4 +1,4 @@
#Tag,BalanceType,Direction,ThresholdType,ThresholdValue,Recurrent,DestinationTag,ActionsTag,Weight
STANDARD_TRIGGERS,*monetary,*out,*min_balance,2,false,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_balance,20,false,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_counter,5,false,FS_USERS,LOG_WARNING,10
#Tag,BalanceTag,Direction,ThresholdType,ThresholdValue,Recurrent,MinSleep,BalanceDestinationTag,BalanceWeight,BalanceExpiryTime,BalanceRatingSubject,BalanceSharedGroup,StatsMinQueuedItems,ActionsTag,Weight
STANDARD_TRIGGERS,*monetary,*out,*min_balance,2,false,0,,,,,,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_balance,20,false,0,,,,,,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_counter,5,false,0,FS_USERS,,,,,,LOG_WARNING,10
1 #Tag BalanceType BalanceTag Direction ThresholdType ThresholdValue Recurrent DestinationTag MinSleep BalanceDestinationTag BalanceWeight BalanceExpiryTime BalanceRatingSubject BalanceSharedGroup StatsMinQueuedItems ActionsTag Weight
2 STANDARD_TRIGGERS *monetary *monetary *out *min_balance 2 false 0 LOG_WARNING 10
3 STANDARD_TRIGGERS *monetary *monetary *out *max_balance 20 false 0 LOG_WARNING 10
4 STANDARD_TRIGGERS *monetary *monetary *out *max_counter 5 false FS_USERS 0 FS_USERS LOG_WARNING 10

View File

@@ -1,4 +1,4 @@
#Tag,BalanceType,Direction,ThresholdType,ThresholdValue,Recurrent,DestinationTag,ActionsTag,Weight
STANDARD_TRIGGERS,*monetary,*out,*min_balance,2,false,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_balance,20,false,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_counter,5,false,FS_USERS,LOG_WARNING,10
#Tag,BalanceTag,Direction,ThresholdType,ThresholdValue,Recurrent,MinSleep,BalanceDestinationTag,BalanceWeight,BalanceExpiryTime,BalanceRatingSubject,BalanceSharedGroup,StatsMinQueuedItems,ActionsTag,Weight
STANDARD_TRIGGERS,*monetary,*out,*min_balance,2,false,0,,,,,,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_balance,20,false,0,,,,,,,LOG_WARNING,10
STANDARD_TRIGGERS,*monetary,*out,*max_counter,5,false,0,FS_USERS,,,,,,LOG_WARNING,10
1 #Tag BalanceType BalanceTag Direction ThresholdType ThresholdValue Recurrent DestinationTag MinSleep BalanceDestinationTag BalanceWeight BalanceExpiryTime BalanceRatingSubject BalanceSharedGroup StatsMinQueuedItems ActionsTag Weight
2 STANDARD_TRIGGERS *monetary *monetary *out *min_balance 2 false 0 LOG_WARNING 10
3 STANDARD_TRIGGERS *monetary *monetary *out *max_balance 20 false 0 LOG_WARNING 10
4 STANDARD_TRIGGERS *monetary *monetary *out *max_counter 5 false FS_USERS 0 FS_USERS LOG_WARNING 10

View File

@@ -115,6 +115,7 @@ func TestStartEngine(t *testing.T) {
if err := engine.Start(); err != nil {
t.Fatal("Cannot start cgr-engine: ", err.Error())
}
time.Sleep(time.Duration(*startDelay) * time.Millisecond) // Give time to rater to fire up
httpClient = new(http.Client)
}