mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
Rename tests with the right ones
This commit is contained in:
committed by
Dan Christian Bogos
parent
c6e9a37804
commit
d1277fe83c
@@ -49,7 +49,7 @@ var sTestsCDRsOfflineIT = []func(t *testing.T){
|
||||
testV2CDRsOfflineLoadData,
|
||||
testV2CDRsOfflineBalanceUpdate,
|
||||
testV2CDRsOfflineExpiryBalance,
|
||||
testV2CDRsSpecialCase,
|
||||
testV2CDRsBalancesWithSameWeight,
|
||||
testV2CDRsOfflineKillEngine,
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@ func testV2CDRsOfflineLoadData(t *testing.T) {
|
||||
}
|
||||
|
||||
func testV2CDRsOfflineBalanceUpdate(t *testing.T) {
|
||||
|
||||
//add a test account with balance type monetary and value 10
|
||||
attrs := &utils.AttrSetBalance{
|
||||
Tenant: "cgrates.org",
|
||||
@@ -214,7 +213,6 @@ func testV2CDRsOfflineBalanceUpdate(t *testing.T) {
|
||||
}
|
||||
|
||||
func testV2CDRsOfflineExpiryBalance(t *testing.T) {
|
||||
|
||||
var reply string
|
||||
acc := &utils.AttrSetActions{ActionsId: "ACT_TOPUP_TEST2", Actions: []*utils.TPAction{
|
||||
&utils.TPAction{Identifier: engine.TOPUP, BalanceType: utils.MONETARY, BalanceId: "BalanceExpired1", Units: "5",
|
||||
@@ -329,7 +327,7 @@ func testV2CDRsOfflineExpiryBalance(t *testing.T) {
|
||||
time.Sleep(time.Duration(150) * time.Millisecond) // Give time for CDR to be rated
|
||||
}
|
||||
|
||||
func testV2CDRsSpecialCase(t *testing.T) {
|
||||
func testV2CDRsBalancesWithSameWeight(t *testing.T) {
|
||||
//add a test account with balance type monetary and value 10
|
||||
attrs := &utils.AttrSetBalance{
|
||||
Tenant: "cgrates.org",
|
||||
@@ -348,7 +346,8 @@ func testV2CDRsSpecialCase(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var acnt *engine.Account
|
||||
if err := cdrsOfflineRpc.Call("ApierV2.GetAccount", &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "specialTest"}, &acnt); err != nil {
|
||||
if err := cdrsOfflineRpc.Call("ApierV2.GetAccount",
|
||||
&utils.AttrGetAccount{Tenant: "cgrates.org", Account: "specialTest"}, &acnt); err != nil {
|
||||
t.Error(err)
|
||||
} else if len(acnt.BalanceMap) != 1 || len(acnt.BalanceMap[utils.MONETARY]) != 2 {
|
||||
t.Errorf("Unexpected balance received: %+v", acnt.BalanceMap[utils.MONETARY])
|
||||
@@ -357,9 +356,9 @@ func testV2CDRsSpecialCase(t *testing.T) {
|
||||
cgrEv := &utils.CGREvent{
|
||||
Tenant: "cgrates.org",
|
||||
Event: map[string]interface{}{
|
||||
utils.OriginID: "testV2CDRsSpecialCase",
|
||||
utils.OriginID: "testV2CDRsBalancesWithSameWeight",
|
||||
utils.OriginHost: "192.168.1.1",
|
||||
utils.Source: "testV2CDRsSpecialCase",
|
||||
utils.Source: "testV2CDRsBalancesWithSameWeight",
|
||||
utils.RequestType: utils.META_POSTPAID,
|
||||
utils.Category: "call",
|
||||
utils.Account: "specialTest",
|
||||
|
||||
@@ -2186,7 +2186,7 @@ func TestAccountAsAccountDigest(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAccountGetBalancesForPrefixSpecialCases(t *testing.T) {
|
||||
func TestAccountGetBalancesGetBalanceWithSameWeight(t *testing.T) {
|
||||
acc := &Account{
|
||||
BalanceMap: map[string]Balances{
|
||||
utils.MONETARY: Balances{
|
||||
@@ -2209,7 +2209,7 @@ func TestAccountGetBalancesForPrefixSpecialCases(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAccountGetBalancesForPrefixSpecialCases2(t *testing.T) {
|
||||
func TestAccountGetBalancesForPrefix2(t *testing.T) {
|
||||
acc := &Account{
|
||||
BalanceMap: map[string]Balances{
|
||||
utils.MONETARY: Balances{
|
||||
@@ -2232,7 +2232,7 @@ func TestAccountGetBalancesForPrefixSpecialCases2(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAccountGetBalancesForPrefixSpecialCases3(t *testing.T) {
|
||||
func TestAccountGetMultipleBalancesForPrefixWithSameWeight(t *testing.T) {
|
||||
acc := &Account{
|
||||
BalanceMap: map[string]Balances{
|
||||
utils.MONETARY: Balances{
|
||||
|
||||
Reference in New Issue
Block a user