mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
Context for tests + little fix for cache args struct
This commit is contained in:
committed by
Dan Christian Bogos
parent
325d4ac25f
commit
b4ae5bda72
@@ -82,7 +82,7 @@ func TestCallCacheReloadCacheFirstCallErr(t *testing.T) {
|
||||
mCC := &ccMock{
|
||||
calls: map[string]func(_ *context.Context, args interface{}, reply interface{}) error{
|
||||
utils.CacheSv1ReloadCache: func(_ *context.Context, args, reply interface{}) error {
|
||||
expArgs := utils.AttrReloadCacheWithAPIOpts{
|
||||
expArgs := &utils.AttrReloadCacheWithAPIOpts{
|
||||
APIOpts: map[string]interface{}{
|
||||
utils.Subsys: utils.MetaChargers,
|
||||
},
|
||||
@@ -231,7 +231,7 @@ func TestCallCacheLoadCache(t *testing.T) {
|
||||
mCC := &ccMock{
|
||||
calls: map[string]func(_ *context.Context, args interface{}, reply interface{}) error{
|
||||
utils.CacheSv1LoadCache: func(_ *context.Context, args, reply interface{}) error {
|
||||
expArgs := utils.AttrReloadCacheWithAPIOpts{
|
||||
expArgs := &utils.AttrReloadCacheWithAPIOpts{
|
||||
APIOpts: map[string]interface{}{
|
||||
utils.Subsys: utils.MetaChargers,
|
||||
},
|
||||
@@ -302,7 +302,7 @@ func TestCallCacheRemoveItems(t *testing.T) {
|
||||
mCC := &ccMock{
|
||||
calls: map[string]func(_ *context.Context, args interface{}, reply interface{}) error{
|
||||
utils.CacheSv1RemoveItems: func(_ *context.Context, args, reply interface{}) error {
|
||||
expArgs := utils.AttrReloadCacheWithAPIOpts{
|
||||
expArgs := &utils.AttrReloadCacheWithAPIOpts{
|
||||
APIOpts: map[string]interface{}{
|
||||
utils.Subsys: utils.MetaChargers,
|
||||
},
|
||||
@@ -714,7 +714,7 @@ func TestGetLoadedIdsError(t *testing.T) {
|
||||
func TestReloadCache(t *testing.T) {
|
||||
data := NewInternalDB(nil, nil, false)
|
||||
cfg := config.NewDefaultCGRConfig()
|
||||
argExpect := utils.AttrReloadCacheWithAPIOpts{
|
||||
argExpect := &utils.AttrReloadCacheWithAPIOpts{
|
||||
APIOpts: map[string]interface{}{},
|
||||
Tenant: "",
|
||||
ArgsCache: map[string][]string{
|
||||
|
||||
Reference in New Issue
Block a user