mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Remove unnecessary dependency between tests
Deleted a helper function that was directly calling strings.Trim in favor of using strings.Trim directly.
This commit is contained in:
committed by
Dan Christian Bogos
parent
0d512f64c2
commit
821b5d05cc
@@ -28,7 +28,6 @@ import (
|
||||
"reflect"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -63,9 +62,6 @@ var (
|
||||
testActionsitremoteSetAccount,
|
||||
testActionsitStopCgrEngine,
|
||||
}
|
||||
dbPath = func(dbType string) string {
|
||||
return strings.Trim(dbType, "*")
|
||||
}
|
||||
)
|
||||
|
||||
func TestActionsit(t *testing.T) {
|
||||
|
||||
@@ -2013,7 +2013,12 @@ func testStorDBitCRUDSMCosts2(t *testing.T) {
|
||||
}
|
||||
|
||||
func testStorDBitFlush(t *testing.T) {
|
||||
if err := storDB.Flush(path.Join(storDBCfg.DataFolderPath, "storage", dbPath(storDBCfg.StorDbCfg().Type))); err != nil {
|
||||
dbScriptPath := path.Join(
|
||||
storDBCfg.DataFolderPath,
|
||||
"storage",
|
||||
strings.Trim(storDBCfg.StorDbCfg().Type, "*"),
|
||||
)
|
||||
if err := storDB.Flush(dbScriptPath); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user