Rename tests with the right ones

This commit is contained in:
TeoV
2019-05-08 10:28:11 +03:00
committed by Dan Christian Bogos
parent c6e9a37804
commit d1277fe83c
2 changed files with 9 additions and 10 deletions

View File

@@ -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",

View File

@@ -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{