Solved loaders integration test

This commit is contained in:
nickolasdaniel
2021-10-11 09:38:52 +03:00
committed by Dan Christian Bogos
parent 8e76fc237e
commit 9b43ea0199

View File

@@ -499,10 +499,11 @@ func testV1LoadAndRemoveProcessRemoveFolderError(t *testing.T) {
if err := os.MkdirAll(flPath, 0777); err != nil {
t.Error(err)
}
_, err := os.Create(path.Join(flPath, utils.ResourcesCsv))
file, err := os.Create(path.Join(flPath, utils.ResourcesCsv))
if err != nil {
t.Error(err)
}
defer file.Close()
data := engine.NewInternalDB(nil, nil, true)
dm := engine.NewDataManager(data, config.CgrConfig().CacheCfg(), nil)
@@ -517,11 +518,11 @@ func testV1LoadAndRemoveProcessRemoveFolderError(t *testing.T) {
}
ldrs := NewLoaderService(dm, cfgLdr, "UTC", nil, nil)
ldrs.ldrs["testV1RemoveProcessFolderError"].lockFilepath = flPath
ldrs.ldrs["testV1RemoveProcessFolderError"].rdrs = map[string]map[string]*openedCSVFile{
utils.MetaResources: {
"not_a_file": &openedCSVFile{
fileName: utils.ResourcesCsv,
},
"not_a_file": nil,
},
}