mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 00:28:44 +05:00
updated it tests in apier and general_tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
c53a3903de
commit
f21ed245ca
@@ -728,6 +728,11 @@ func testOnStorITActions(t *testing.T) {
|
||||
acts, utils.NonTransactional); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if rcv, err := onStor.HasData(utils.ACTION_PREFIX, acts[0].Id, ""); err != nil {
|
||||
t.Error(err)
|
||||
} else if rcv != true {
|
||||
t.Errorf("Expecting: true, received: %v", rcv)
|
||||
}
|
||||
//get from cache
|
||||
if rcv, err := onStor.GetActions(acts[0].Id,
|
||||
false, utils.NonTransactional); err != nil {
|
||||
|
||||
@@ -738,8 +738,15 @@ func (iDB *InternalDB) GetActionsDrv(id string) (acts Actions, err error) {
|
||||
}
|
||||
|
||||
func (iDB *InternalDB) SetActionsDrv(id string, acts Actions) (err error) {
|
||||
utils.Logger.Debug("ENTER IN SET ACTIONS DRV ??? ")
|
||||
iDB.db.Set(utils.CacheActions, id, acts, nil,
|
||||
cacheCommit(utils.NonTransactional), utils.NonTransactional)
|
||||
utils.Logger.Debug("Set With Success ")
|
||||
x, ok := iDB.db.Get(utils.CacheActions, id)
|
||||
if !ok || x == nil {
|
||||
utils.Logger.Debug("NOT FOUND ")
|
||||
}
|
||||
utils.Logger.Debug(fmt.Sprintf("ACTIONS : %+v", utils.ToJSON(x.(Actions))))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user