mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Updated gocs_it_test for debiting account of au_site only by replication
This commit is contained in:
committed by
Dan Christian Bogos
parent
df7ab84462
commit
42892eff01
@@ -1,4 +1,4 @@
|
||||
#Tenant,ID,Subsystems,FilterIDs,ActivationInterval,Strategy,StrategyParameters,ConnID,ConnFilterIDs,ConnWeight,ConnBlocker,ConnParameters,Weight
|
||||
cgrates.org,BROADCAST,*sessions,,,*broadcast_sync,,AU_SITE,,20,false,,30
|
||||
cgrates.org,BROADCAST,,,,,,US_SITE,,20,,,
|
||||
cgrates.org,BROADCAST,*sessions,,,*broadcast_sync,,US_SITE,,20,false,,30
|
||||
#cgrates.org,BROADCAST,,,,,,US_SITE,,20,,,
|
||||
cgrates.org,SELF,*any,,,*weight,,SELF,,20,false,,10
|
||||
|
@@ -284,17 +284,6 @@ func testGOCSInitSession(t *testing.T) {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
|
||||
aSessions := make([]*sessions.ExternalSession, 0)
|
||||
if err := auRPC.Call(context.Background(), utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err != nil {
|
||||
t.Error(err)
|
||||
} else if len(aSessions) != 1 {
|
||||
t.Errorf("wrong active sessions: %s \n , and len(aSessions) %+v", utils.ToJSON(aSessions), len(aSessions))
|
||||
} else if aSessions[0].NodeID != "AU_SITE" {
|
||||
t.Errorf("Expecting : %+v, received: %+v", "AU_SITE", aSessions[0].NodeID)
|
||||
} else if aSessions[0].Usage != 5*time.Minute {
|
||||
t.Errorf("Expecting : %+v, received: %+v", 5*time.Minute, aSessions[0].MaxCostSoFar)
|
||||
}
|
||||
|
||||
aSessions = make([]*sessions.ExternalSession, 0)
|
||||
if err := usRPC.Call(context.Background(), utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err != nil {
|
||||
t.Error(err)
|
||||
} else if len(aSessions) != 1 {
|
||||
@@ -363,7 +352,7 @@ func testGOCSUpdateSession(t *testing.T) {
|
||||
t.Errorf("wrong active sessions: %s", utils.ToJSON(aSessions))
|
||||
} else if aSessions[0].NodeID != "AU_SITE" {
|
||||
t.Errorf("Expecting : %+v, received: %+v", "AU_SITE", aSessions[0].NodeID)
|
||||
} else if aSessions[0].Usage != 10*time.Minute {
|
||||
} else if aSessions[0].Usage != 5*time.Minute {
|
||||
t.Errorf("Expecting : %+v, received: %+v", 5*time.Minute, aSessions[0].Usage)
|
||||
}
|
||||
|
||||
@@ -441,8 +430,8 @@ func testGOCSUpdateSession2(t *testing.T) {
|
||||
t.Errorf("wrong active sessions: %s", utils.ToJSON(aSessions))
|
||||
} else if aSessions[0].NodeID != "AU_SITE" {
|
||||
t.Errorf("Expecting : %+v, received: %+v", "AU_SITE", aSessions[0].NodeID)
|
||||
} else if aSessions[0].Usage != 15*time.Minute {
|
||||
t.Errorf("Expecting : %+v, received: %+v", 15*time.Minute, aSessions[0].Usage)
|
||||
} else if aSessions[0].Usage != 5*time.Minute {
|
||||
t.Errorf("Expecting : %+v, received: %+v", 5*time.Minute, aSessions[0].Usage)
|
||||
}
|
||||
|
||||
aSessions = make([]*sessions.ExternalSession, 0)
|
||||
@@ -507,10 +496,6 @@ func testGOCSTerminateSession(t *testing.T) {
|
||||
t.Errorf("Unexpected reply: %s", rply)
|
||||
}
|
||||
aSessions := make([]*sessions.ExternalSession, 0)
|
||||
if err := auRPC.Call(context.Background(), utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err == nil ||
|
||||
err.Error() != utils.ErrNotFound.Error() {
|
||||
t.Errorf("Expected error %s received error %v and reply %s", utils.ErrNotFound, err, utils.ToJSON(aSessions))
|
||||
}
|
||||
if err := usRPC.Call(context.Background(), utils.SessionSv1GetActiveSessions, new(utils.SessionFilter), &aSessions); err == nil ||
|
||||
err.Error() != utils.ErrNotFound.Error() {
|
||||
t.Errorf("Expected error %s received error %v and reply %s", utils.ErrNotFound, err, utils.ToJSON(aSessions))
|
||||
|
||||
Reference in New Issue
Block a user