mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 07:08:45 +05:00
Refactored integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
52a1902c65
commit
47f0017970
@@ -177,7 +177,7 @@ func testAnalyzerSChargerSv1ProcessEvent(t *testing.T) {
|
||||
processedEv := []*engine.ChrgSProcessEventReply{
|
||||
{
|
||||
ChargerSProfile: "DEFAULT",
|
||||
AlteredFields: []string{"*opts.*runID"},
|
||||
AlteredFields: []string{"*opts.*runID", "*opts.*chargeID"},
|
||||
CGREvent: &utils.CGREvent{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "event1",
|
||||
@@ -187,15 +187,16 @@ func testAnalyzerSChargerSv1ProcessEvent(t *testing.T) {
|
||||
"Subject": "Something_inter",
|
||||
},
|
||||
APIOpts: map[string]interface{}{
|
||||
"*subsys": "*chargers",
|
||||
"*runID": "*default",
|
||||
"*chargeID": "51d52496c3d63ffd60ba91e69aa532d89cc5bd79",
|
||||
"*subsys": "*chargers",
|
||||
"*runID": "*default",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ChargerSProfile: "Raw",
|
||||
AttributeSProfiles: []string{"*constant:*req.RequestType:*none"},
|
||||
AlteredFields: []string{"*opts.*runID", "*req.RequestType"},
|
||||
AlteredFields: []string{"*opts.*runID", "*opts.*chargeID", "*req.RequestType"},
|
||||
CGREvent: &utils.CGREvent{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "event1",
|
||||
@@ -206,6 +207,7 @@ func testAnalyzerSChargerSv1ProcessEvent(t *testing.T) {
|
||||
"Subject": "Something_inter",
|
||||
},
|
||||
APIOpts: map[string]interface{}{
|
||||
"*chargeID": "94e6cdc358e52bd7061f224a4bcf5faa57735989",
|
||||
"*runID": "*raw",
|
||||
"*attrProfileIDs": []interface{}{"*constant:*req.RequestType:*none"},
|
||||
"*context": "*chargers",
|
||||
|
||||
@@ -157,13 +157,14 @@ func testRPCChargerSWithAttr(t *testing.T) {
|
||||
processedEv := []*engine.ChrgSProcessEventReply{
|
||||
{
|
||||
ChargerSProfile: "CustomerCharges",
|
||||
AlteredFields: []string{"*opts.*runID"},
|
||||
AlteredFields: []string{"*opts.*runID", "*opts.*chargeID"},
|
||||
CGREvent: &utils.CGREvent{
|
||||
Tenant: "cgrates.org",
|
||||
Event: map[string]interface{}{
|
||||
"Account": "1010",
|
||||
},
|
||||
APIOpts: map[string]interface{}{
|
||||
"*chargeID": "908bd346b2203977a829c917ba25d1cd784842be",
|
||||
"*attrProcessRuns": 1.,
|
||||
"*subsys": "*chargers",
|
||||
"*runID": "CustomerCharges",
|
||||
@@ -172,7 +173,7 @@ func testRPCChargerSWithAttr(t *testing.T) {
|
||||
}, {
|
||||
ChargerSProfile: "Raw",
|
||||
AttributeSProfiles: []string{"*constant:*req.RequestType:*none"},
|
||||
AlteredFields: []string{"*opts.*runID", "*req.RequestType"},
|
||||
AlteredFields: []string{"*opts.*runID", "*opts.*chargeID", "*req.RequestType"},
|
||||
CGREvent: &utils.CGREvent{
|
||||
Tenant: "cgrates.org",
|
||||
Event: map[string]interface{}{
|
||||
@@ -180,6 +181,7 @@ func testRPCChargerSWithAttr(t *testing.T) {
|
||||
"RequestType": "*none",
|
||||
},
|
||||
APIOpts: map[string]interface{}{
|
||||
"*chargeID": "ce15802a8c5e8e9db0ffaf10130ef265296e9ea4",
|
||||
"*attrProcessRuns": 1.,
|
||||
"*subsys": "*chargers",
|
||||
"*runID": "raw",
|
||||
@@ -190,7 +192,7 @@ func testRPCChargerSWithAttr(t *testing.T) {
|
||||
}, {
|
||||
ChargerSProfile: "SupplierCharges",
|
||||
AttributeSProfiles: []string{"cgrates.org:ATTR_SUPPLIER1"},
|
||||
AlteredFields: []string{"*opts.*runID", "*req.Subject"},
|
||||
AlteredFields: []string{"*opts.*runID", "*opts.*chargeID", "*req.Subject"},
|
||||
CGREvent: &utils.CGREvent{
|
||||
Tenant: "cgrates.org",
|
||||
Event: map[string]interface{}{
|
||||
@@ -198,11 +200,12 @@ func testRPCChargerSWithAttr(t *testing.T) {
|
||||
"Subject": "SUPPLIER1",
|
||||
},
|
||||
APIOpts: map[string]interface{}{
|
||||
"*chargeID": "c0766c230f77b0ee496629be7efa0db24e208cfe",
|
||||
"*context": "*chargers",
|
||||
"*attrProcessRuns": 1.,
|
||||
"*subsys": "*chargers",
|
||||
"*runID": "SupplierCharges",
|
||||
"*attrProfileIDs": []interface{}{"ATTR_SUPPLIER1"},
|
||||
"*context": "*chargers",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user