mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 18:46:24 +05:00
Modifide supliers for supliers integration tests.
This commit is contained in:
committed by
Dan Christian Bogos
parent
1192df9843
commit
dea13048df
@@ -1300,6 +1300,18 @@ func TestApierComputeReverse(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure balance was topped-up
|
||||
// Bug reported by DigiDaz over IRC
|
||||
func TestApierGetAccountAfterLoad(t *testing.T) {
|
||||
var reply *engine.Account
|
||||
attrs := &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "1001"}
|
||||
if err := rater.Call("ApierV2.GetAccount", attrs, &reply); err != nil {
|
||||
t.Error("Got error on ApierV1.GetAccount: ", err.Error())
|
||||
} else if reply.BalanceMap[utils.MONETARY].GetTotalValue() != 11 {
|
||||
t.Errorf("Calling ApierV1.GetBalance expected: 11, received: %v", reply.BalanceMap[utils.MONETARY].GetTotalValue())
|
||||
}
|
||||
}
|
||||
|
||||
func TestApierResetDataAfterLoadFromFolder(t *testing.T) {
|
||||
expStats := &utils.CacheStats{
|
||||
Destinations: 3,
|
||||
@@ -1344,18 +1356,6 @@ func TestApierResetDataAfterLoadFromFolder(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure balance was topped-up
|
||||
// Bug reported by DigiDaz over IRC
|
||||
func TestApierGetAccountAfterLoad(t *testing.T) {
|
||||
var reply *engine.Account
|
||||
attrs := &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "1001"}
|
||||
if err := rater.Call("ApierV2.GetAccount", attrs, &reply); err != nil {
|
||||
t.Error("Got error on ApierV1.GetAccount: ", err.Error())
|
||||
} else if reply.BalanceMap[utils.MONETARY].GetTotalValue() != 11 {
|
||||
t.Errorf("Calling ApierV1.GetBalance expected: 11, received: %f", reply.BalanceMap[utils.MONETARY].GetTotalValue())
|
||||
}
|
||||
}
|
||||
|
||||
// Test here ResponderGetCost
|
||||
func TestApierResponderGetCost(t *testing.T) {
|
||||
tStart, _ := utils.ParseDate("2013-08-07T17:30:00Z")
|
||||
|
||||
@@ -391,7 +391,6 @@ func testV1SplSGetHighestCostSuppliers(t *testing.T) {
|
||||
} else if !reflect.DeepEqual(eSpls, suplsReply) {
|
||||
t.Errorf("Expecting: %s, received: %s",
|
||||
utils.ToJSON(eSpls), utils.ToJSON(suplsReply))
|
||||
panic(utils.ToJSON(suplsReply))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,7 +546,7 @@ func testV1SplSGetQOSSuppliers(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "testV1SplSGetQOSSuppliers",
|
||||
Event: map[string]interface{}{
|
||||
"DistincMatch": "*qos",
|
||||
"DistinctMatch": "*qos",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -604,7 +603,7 @@ func testV1SplSGetQOSSuppliers2(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "testV1SplSGetQOSSuppliers",
|
||||
Event: map[string]interface{}{
|
||||
"DistincMatch": "*qos2",
|
||||
"DistinctMatch": "*qos2",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -660,7 +659,7 @@ func testV1SplSGetQOSSuppliers3(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "testV1SplSGetQOSSuppliers",
|
||||
Event: map[string]interface{}{
|
||||
"DistincMatch": "*qos3",
|
||||
"DistinctMatch": "*qos3",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -716,7 +715,7 @@ func testV1SplSGetQOSSuppliersFiltred(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "testV1SplSGetQOSSuppliers",
|
||||
Event: map[string]interface{}{
|
||||
"DistincMatch": "*qos_filtred",
|
||||
"DistinctMatch": "*qos_filtred",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -763,7 +762,7 @@ func testV1SplSGetQOSSuppliersFiltred2(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "testV1SplSGetQOSSuppliers",
|
||||
Event: map[string]interface{}{
|
||||
"DistincMatch": "*qos_filtred2",
|
||||
"DistinctMatch": "*qos_filtred2",
|
||||
utils.Account: "1003",
|
||||
utils.Destination: "1002",
|
||||
utils.SetupTime: time.Date(2017, 12, 1, 14, 25, 0, 0, time.UTC),
|
||||
@@ -804,7 +803,6 @@ func testV1SplSGetQOSSuppliersFiltred2(t *testing.T) {
|
||||
} else if !reflect.DeepEqual(eSpls, suplsReply) {
|
||||
t.Errorf("Expecting: %s, received: %s",
|
||||
utils.ToJSON(eSpls), utils.ToJSON(suplsReply))
|
||||
panic(utils.ToJSON(suplsReply))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,19 +9,19 @@ cgrates.org,FLTR_ACNT_dan,*string,Account,dan,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_ACNT_dan,*string,*req.Account,dan,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_2,*string,Account,1003,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_2,*prefix,Destination,10;20,
|
||||
cgrates.org,FLTR_SPP_2,*string,DistincMatch,*highest_cost,
|
||||
cgrates.org,FLTR_SPP_3,*string,DistincMatch,*qos,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_2,*string,DistinctMatch,*highest_cost,
|
||||
cgrates.org,FLTR_SPP_3,*string,DistinctMatch,*qos,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_STAT_1,*string,Account,1001,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_STAT_2,*string,Account,1002,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_STAT_3,*string,Account,1003,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_4,*string,DistincMatch,*qos2,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_5,*string,DistincMatch,*qos3,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_4,*string,DistinctMatch,*qos2,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_5,*string,DistinctMatch,*qos3,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_STAT_1_1,*string,Stat,Stat1_1,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_6,*string,DistincMatch,*qos_filtred,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_6,*string,DistinctMatch,*qos_filtred,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_QOS_SP1,*gte,*gs.*acd,10.0,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_QOS_SP2,*gte,*gs.*acd,10.0,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_QOS_SP2,*gte,*gs.*tcd,11.0,
|
||||
cgrates.org,FLTR_SPP_QOS_2,*string,DistincMatch,*qos_filtred2,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_SPP_QOS_2,*string,DistinctMatch,*qos_filtred2,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_QOS_SP1_2,*gte,*sd.Cost,0.1,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_QOS_SP2_2,*gte,*sd.Cost,0.2,2014-07-29T15:00:00Z
|
||||
cgrates.org,FLTR_TEST,*string,Subject,TEST,2014-07-29T15:00:00Z
|
||||
|
@@ -8,22 +8,22 @@ cgrates.org,SPL_WEIGHT_1,FLTR_ACNT_1007,,,,supplier3,FLTR_SPP_ACNT_dan,,,,,15,,,
|
||||
cgrates.org,SPL_LEASTCOST_1,FLTR_1,2017-11-27T00:00:00Z,*least_cost,,supplier1,,,RP_SPECIAL_1002,,,10,false,,10
|
||||
cgrates.org,SPL_LEASTCOST_1,,,,,supplier2,,,RP_RETAIL1,,,20,,,
|
||||
cgrates.org,SPL_LEASTCOST_1,,,,,supplier3,,,RP_SPECIAL_1002,,,15,,,
|
||||
cgrates.org,SPL_HIGHESTCOST_1,FLTR_SPP_2,2017-11-27T00:00:00Z,*highest_cost,,supplier1,,,RP_SPECIAL_1002,,,10,false,,10
|
||||
cgrates.org,SPL_HIGHESTCOST_1,FLTR_SPP_2,2017-11-27T00:00:00Z,*highest_cost,,supplier1,,,RP_SPECIAL_1002,,,10,false,,20
|
||||
cgrates.org,SPL_HIGHESTCOST_1,,,,,supplier2,,,RP_RETAIL1,,,20,,,
|
||||
cgrates.org,SPL_HIGHESTCOST_1,,,,,supplier3,,,RP_SPECIAL_1002,,,15,,,
|
||||
cgrates.org,SPL_QOS_1,FLTR_SPP_3,2017-11-27T00:00:00Z,*qos,*acd;*tcd;*asr,supplier1,,,,,Stat_1;Stat_1_1,10,false,,10
|
||||
cgrates.org,SPL_QOS_1,FLTR_SPP_3,2017-11-27T00:00:00Z,*qos,*acd;*tcd;*asr,supplier1,,,,,Stat_1;Stat_1_1,10,false,,20
|
||||
cgrates.org,SPL_QOS_1,,,,,supplier2,,,,,Stat_2,20,,,
|
||||
cgrates.org,SPL_QOS_1,,,,,supplier3,,,,,Stat_3,35,,,
|
||||
cgrates.org,SPL_QOS_2,FLTR_SPP_4,2017-11-27T00:00:00Z,*qos,*dcc,supplier1,,,,,Stat_1;Stat_1_1,10,false,,10
|
||||
cgrates.org,SPL_QOS_2,FLTR_SPP_4,2017-11-27T00:00:00Z,*qos,*dcc,supplier1,,,,,Stat_1;Stat_1_1,10,false,,20
|
||||
cgrates.org,SPL_QOS_2,,,,,supplier2,,,,,Stat_2,20,,,
|
||||
cgrates.org,SPL_QOS_2,,,,,supplier3,,,,,Stat_3,35,,,
|
||||
cgrates.org,SPL_QOS_3,FLTR_SPP_5,2017-11-27T00:00:00Z,*qos,*pdd,supplier1,,,,,Stat_1;Stat_1_1,10,false,,10
|
||||
cgrates.org,SPL_QOS_3,FLTR_SPP_5,2017-11-27T00:00:00Z,*qos,*pdd,supplier1,,,,,Stat_1;Stat_1_1,10,false,,20
|
||||
cgrates.org,SPL_QOS_3,,,,,supplier2,,,,,Stat_2,20,,,
|
||||
cgrates.org,SPL_QOS_3,,,,,supplier3,,,,,Stat_3,35,,,
|
||||
cgrates.org,SPL_QOS_FILTRED,FLTR_SPP_6,2017-11-27T00:00:00Z,*qos,*pdd,supplier1,FLTR_QOS_SP1,,,,Stat_1;Stat_1_1,10,false,,10
|
||||
cgrates.org,SPL_QOS_FILTRED,FLTR_SPP_6,2017-11-27T00:00:00Z,*qos,*pdd,supplier1,FLTR_QOS_SP1,,,,Stat_1;Stat_1_1,10,false,,20
|
||||
cgrates.org,SPL_QOS_FILTRED,,,,,supplier2,FLTR_QOS_SP2,,,,Stat_2,20,,,
|
||||
cgrates.org,SPL_QOS_FILTRED,,,,,supplier3,,,,,Stat_3,35,,,
|
||||
cgrates.org,SPL_QOS_FILTRED2,FLTR_SPP_QOS_2,2017-11-27T00:00:00Z,*qos,*acd;*tcd;*asr,supplier1,FLTR_QOS_SP1_2,,RP_SPECIAL_1002,,Stat_1;Stat_1_1,10,false,,10
|
||||
cgrates.org,SPL_QOS_FILTRED2,FLTR_SPP_QOS_2,2017-11-27T00:00:00Z,*qos,*acd;*tcd;*asr,supplier1,FLTR_QOS_SP1_2,,RP_SPECIAL_1002,,Stat_1;Stat_1_1,10,false,,20
|
||||
cgrates.org,SPL_QOS_FILTRED2,,,,,supplier2,FLTR_QOS_SP2_2,,RP_RETAIL1,,Stat_2,20,,,
|
||||
cgrates.org,SPL_QOS_FILTRED2,,,,,supplier3,,,,,Stat_3,35,,,
|
||||
cgrates.org,SPL_LCR,FLTR_TEST,2017-11-27T00:00:00Z,*least_cost,,supplier_1,,,RP_TEST_1,,,10,,,50
|
||||
|
||||
|
Reference in New Issue
Block a user