updated it tests in apier and general_tests

This commit is contained in:
adragusin
2020-03-02 18:05:17 +02:00
committed by Dan Christian Bogos
parent c53a3903de
commit f21ed245ca
6 changed files with 289 additions and 60 deletions

View File

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

View File

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