Updated SessionsAuthorize API

This commit is contained in:
Trial97
2021-08-24 10:49:24 +03:00
committed by Dan Christian Bogos
parent 51d828ff2e
commit b528bd0567
6 changed files with 163 additions and 127 deletions

View File

@@ -203,9 +203,9 @@ func testA1itDataSession1(t *testing.T) {
utils.Usage: "10240",
},
APIOpts: map[string]interface{}{
utils.OptsSSTTL: "28800s",
utils.OptsSSTTLLastUsed: "0s",
utils.OptsSSTTLUsage: "0s",
utils.OptsSesTTL: "28800s",
utils.OptsSesTTLLastUsed: "0s",
utils.OptsSesTTLUsage: "0s",
},
},
}
@@ -242,9 +242,9 @@ func testA1itDataSession1(t *testing.T) {
utils.Usage: "2097152",
},
APIOpts: map[string]interface{}{
utils.OptsSSTTL: "28800s",
utils.OptsSSTTLLastUsed: "2097152s",
utils.OptsSSTTLUsage: "0s",
utils.OptsSesTTL: "28800s",
utils.OptsSesTTLLastUsed: "2097152s",
utils.OptsSesTTLUsage: "0s",
},
},
}

View File

@@ -462,10 +462,10 @@ func testV1DataInitSession(t *testing.T) {
utils.Usage: initUsage,
},
APIOpts: map[string]interface{}{
utils.OptsSSTTL: "300s",
utils.OptsSSTTLLastUsed: "0s",
utils.OptsSSTTLMaxDelay: "1800s",
utils.OptsSSTTLUsage: "0s",
utils.OptsSesTTL: "300s",
utils.OptsSesTTLLastUsed: "0s",
utils.OptsSesTTLMaxDelay: "1800s",
utils.OptsSesTTLUsage: "0s",
},
},
}
@@ -509,10 +509,10 @@ func testV1DataUpdateWith1Mo(t *testing.T) {
utils.Usage: reqUsage,
},
APIOpts: map[string]interface{}{
utils.OptsSSTTL: "28807s",
utils.OptsSSTTLLastUsed: "0s",
utils.OptsSSTTLMaxDelay: "1800s",
utils.OptsSSTTLUsage: "0s"},
utils.OptsSesTTL: "28807s",
utils.OptsSesTTLLastUsed: "0s",
utils.OptsSesTTLMaxDelay: "1800s",
utils.OptsSesTTLUsage: "0s"},
},
}
var rply sessions.V1UpdateSessionReply
@@ -553,10 +553,10 @@ func testV1DataUpdateWith1Go(t *testing.T) {
utils.Usage: reqUsage,
},
APIOpts: map[string]interface{}{
utils.OptsSSTTL: "28807s",
utils.OptsSSTTLLastUsed: "0s",
utils.OptsSSTTLMaxDelay: "1800s",
utils.OptsSSTTLUsage: "0s"},
utils.OptsSesTTL: "28807s",
utils.OptsSesTTLLastUsed: "0s",
utils.OptsSesTTLMaxDelay: "1800s",
utils.OptsSesTTLUsage: "0s"},
},
}
var rply sessions.V1UpdateSessionReply

View File

@@ -142,7 +142,7 @@ func testSesNoneReqTypeItInit(t *testing.T) {
utils.Usage: 10 * time.Second,
},
APIOpts: map[string]interface{}{
utils.OptsSSDebitInterval: "0s",
utils.OptsSesDebitInterval: "0s",
},
},
}

View File

@@ -137,8 +137,8 @@ func testSesPauseItInitSession(t *testing.T, cgrID string, chargeable bool, usag
utils.Usage: usage,
},
APIOpts: map[string]interface{}{
utils.OptsSSDebitInterval: "0s",
utils.OptsSSChargeable: chargeable,
utils.OptsSesDebitInterval: "0s",
utils.OptsSesChargeable: chargeable,
},
},
}
@@ -171,7 +171,7 @@ func testSesPauseItUpdateSession(t *testing.T, cgrID string, chargeable bool, us
utils.Usage: usage,
},
APIOpts: map[string]interface{}{
utils.OptsSSChargeable: chargeable,
utils.OptsSesChargeable: chargeable,
},
},
}
@@ -204,7 +204,7 @@ func testSesPauseItTerminateSession(t *testing.T, cgrID string, chargeable bool,
utils.Usage: usage,
},
APIOpts: map[string]interface{}{
utils.OptsSSChargeable: chargeable,
utils.OptsSesChargeable: chargeable,
},
},
}