From 6d0cbfe2aacddf528aa85c084301a2ad0dfa1e82 Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Wed, 7 May 2014 20:02:02 +0300 Subject: [PATCH] local tests fixes for rounding movement --- apier/apier_local_test.go | 2 +- data/tariffplans/prepaid1centpsec/DestinationRates.csv | 2 +- data/tariffplans/prepaid1centpsec/Rates.csv | 2 +- engine/loader_helpers.go | 2 +- engine/loader_helpers_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apier/apier_local_test.go b/apier/apier_local_test.go index a93d45aa6..291eb9ec8 100644 --- a/apier/apier_local_test.go +++ b/apier/apier_local_test.go @@ -286,7 +286,7 @@ func TestApierTPRate(t *testing.T) { } reply := "" rt := &utils.TPRate{TPid: engine.TEST_SQL, RateId: "RT_FS_USERS", RateSlots: []*utils.RateSlot{ - &utils.RateSlot{ConnectFee: 0, Rate: 0, RateUnit: "60s", RateIncrement: "60s", GroupIntervalStart: "0s", RoundingMethod: "*up", RoundingDecimals: 0}, + &utils.RateSlot{ConnectFee: 0, Rate: 0, RateUnit: "60s", RateIncrement: "60s", GroupIntervalStart: "0s"}, }} rt2 := new(utils.TPRate) *rt2 = *rt diff --git a/data/tariffplans/prepaid1centpsec/DestinationRates.csv b/data/tariffplans/prepaid1centpsec/DestinationRates.csv index 3c841e62f..e1f2707ba 100644 --- a/data/tariffplans/prepaid1centpsec/DestinationRates.csv +++ b/data/tariffplans/prepaid1centpsec/DestinationRates.csv @@ -1,3 +1,3 @@ -#Tag,DestinationsTag,RatesTag +#Tag,DestinationsTag,RatesTag,RoundingMethod,RoundingDecimals DR_RETAIL,GERMANY,RT_1CENT,*up,2 DR_RETAIL,GERMANY_MOBILE,RT_1CENT,*up,2 diff --git a/data/tariffplans/prepaid1centpsec/Rates.csv b/data/tariffplans/prepaid1centpsec/Rates.csv index 21aa20e17..2afc7701b 100644 --- a/data/tariffplans/prepaid1centpsec/Rates.csv +++ b/data/tariffplans/prepaid1centpsec/Rates.csv @@ -1,2 +1,2 @@ -#Tag,ConnectFee,Rate,RateUnit,RateIncrement,GroupIntervalStart,RoundingMethod,RoundingDecimals +#Tag,ConnectFee,Rate,RateUnit,RateIncrement,GroupIntervalStart RT_1CENT,0,1,1s,1s,0s diff --git a/engine/loader_helpers.go b/engine/loader_helpers.go index 56d5b5b6c..ed063b74b 100644 --- a/engine/loader_helpers.go +++ b/engine/loader_helpers.go @@ -184,7 +184,7 @@ var FileValidators = map[string]*FileLineRegexValidator{ regexp.MustCompile(`(?:\w+\s*,\s*){1}(?:\d+\.?\d*,){2}(?:\d+s*,?){3}$`), "Tag([0-9A-Za-z_]),ConnectFee([0-9.]),Rate([0-9.]),RateUnit([0-9.]),RateIncrementStart([0-9.])"}, utils.DESTINATION_RATES_CSV: &FileLineRegexValidator{utils.DESTINATION_RATES_NRCOLS, - regexp.MustCompile(`^(?:\w+\s*),(?:\w+\s*),(?:\w+\s*)$`), + regexp.MustCompile(`^(?:\w+\s*),(?:\w+\s*),(?:\w+\s*),(?:\w+\s*)(?:\*\w+,){1}(?:\d+\.?\d*,?){1}$`), "Tag([0-9A-Za-z_]),DestinationsTag([0-9A-Za-z_]),RateTag([0-9A-Za-z_])"}, utils.RATING_PLANS_CSV: &FileLineRegexValidator{utils.DESTRATE_TIMINGS_NRCOLS, regexp.MustCompile(`(?:\w+\s*,\s*){3}(?:\d+.?\d*){1}$`), diff --git a/engine/loader_helpers_test.go b/engine/loader_helpers_test.go index a3ded234b..e60cfbc95 100644 --- a/engine/loader_helpers_test.go +++ b/engine/loader_helpers_test.go @@ -45,7 +45,7 @@ DUMMY,INVALID;DATA ` var destRatesSample = `#Tag,DestinationsTag,RatesTag -DR_RETAIL,GERMANY,RT_1CENT +DR_RETAIL,GERMANY,RT_1CENT,*up,0 DUMMY,INVALID;DATA ` var ratingPlansSample = `#Tag,DestinationRatesTag,TimingTag,Weight