mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
Update integration test for EEs
This commit is contained in:
committed by
Dan Christian Bogos
parent
833fcfc657
commit
196f8da1cc
@@ -194,21 +194,15 @@ func testCsvExportEvent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventData, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventSMS, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
@@ -302,16 +296,12 @@ func testCsvExportComposedEvent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventSMS, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
@@ -378,10 +368,9 @@ func testCsvExportMaskedDestination(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
var rply map[string]utils.MapStorage
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &rply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
@@ -498,21 +487,15 @@ func testCsvExportEventWithInflateTemplate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventData, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
if err := csvRpc.Call(utils.EventExporterSv1ProcessEvent, eventSMS, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
||||
@@ -126,11 +126,9 @@ func testFwvExportEvent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := fwvRpc.Call(utils.EventExporterSv1ProcessEvent, event, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
||||
@@ -203,11 +203,9 @@ func testHTTPJsonMapExportEvent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := httpJSONMapRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// verify HTTPJsonMap for eventVoice
|
||||
@@ -226,8 +224,6 @@ func testHTTPJsonMapExportEvent(t *testing.T) {
|
||||
}
|
||||
if err := httpJSONMapRpc.Call(utils.EventExporterSv1ProcessEvent, eventData, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// verify HTTPJsonMap for eventData
|
||||
@@ -246,8 +242,6 @@ func testHTTPJsonMapExportEvent(t *testing.T) {
|
||||
}
|
||||
if err := httpJSONMapRpc.Call(utils.EventExporterSv1ProcessEvent, eventSMS, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// verify HTTPJsonMap for eventSMS
|
||||
|
||||
@@ -200,11 +200,9 @@ func testHTTPExportEvent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := httpPostRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// verify HTTPValues for eventVoice
|
||||
@@ -223,8 +221,6 @@ func testHTTPExportEvent(t *testing.T) {
|
||||
}
|
||||
if err := httpPostRpc.Call(utils.EventExporterSv1ProcessEvent, eventData, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// verify HTTPValues for eventData
|
||||
@@ -243,8 +239,6 @@ func testHTTPExportEvent(t *testing.T) {
|
||||
}
|
||||
if err := httpPostRpc.Call(utils.EventExporterSv1ProcessEvent, eventSMS, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// verify HTTPValues for eventSMS
|
||||
|
||||
@@ -127,11 +127,9 @@ func testVirtExportSupplierEvent(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := virtRpc.Call(utils.EventExporterSv1ProcessEvent, supplierEvent, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
@@ -164,11 +162,9 @@ func testVirtExportEvents(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
var reply string
|
||||
var reply map[string]utils.MapStorage
|
||||
if err := virtRpc.Call(utils.EventExporterSv1ProcessEvent, eventVoice, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected %+v, received: %+v", utils.OK, reply)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user