mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-25 11:46:40 +00:00
Remove Debugs
This commit is contained in:
@@ -280,8 +280,6 @@ func NewTestStoreFromSQL(ctx context.Context, filename string, dataDir string) (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] Kind Type: %s", kind)
|
|
||||||
|
|
||||||
store, err := NewSqlStore(ctx, db, SqliteStoreEngine, nil)
|
store, err := NewSqlStore(ctx, db, SqliteStoreEngine, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, fmt.Errorf("failed to create test store: %v", err)
|
return nil, nil, fmt.Errorf("failed to create test store: %v", err)
|
||||||
@@ -292,8 +290,6 @@ func NewTestStoreFromSQL(ctx context.Context, filename string, dataDir string) (
|
|||||||
|
|
||||||
func getSqlStoreEngine(ctx context.Context, store *SqlStore, kind StoreEngine) (Store, func(), error) {
|
func getSqlStoreEngine(ctx context.Context, store *SqlStore, kind StoreEngine) (Store, func(), error) {
|
||||||
|
|
||||||
log.Printf("[DEBUG] Kind Type - 2: %s", kind)
|
|
||||||
|
|
||||||
if kind == PostgresStoreEngine {
|
if kind == PostgresStoreEngine {
|
||||||
cleanUp, err := testutil.CreatePGDB()
|
cleanUp, err := testutil.CreatePGDB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -305,8 +301,6 @@ func getSqlStoreEngine(ctx context.Context, store *SqlStore, kind StoreEngine) (
|
|||||||
return nil, nil, fmt.Errorf("%s is not set", postgresDsnEnv)
|
return nil, nil, fmt.Errorf("%s is not set", postgresDsnEnv)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] PostgresStoreEngine DSN: %s", dsn)
|
|
||||||
|
|
||||||
store, err = NewPostgresqlStoreFromSqlStore(ctx, store, dsn, nil)
|
store, err = NewPostgresqlStoreFromSqlStore(ctx, store, dsn, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
@@ -326,8 +320,6 @@ func getSqlStoreEngine(ctx context.Context, store *SqlStore, kind StoreEngine) (
|
|||||||
return nil, nil, fmt.Errorf("%s is not set", mysqlDsnEnv)
|
return nil, nil, fmt.Errorf("%s is not set", mysqlDsnEnv)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] MysqlStoreEngine DSN: %s", dsn)
|
|
||||||
|
|
||||||
store, err = NewMysqlStoreFromSqlStore(ctx, store, dsn, nil)
|
store, err = NewMysqlStoreFromSqlStore(ctx, store, dsn, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ func CreatePGDB() (func(), error) {
|
|||||||
|
|
||||||
func CreateMyDB() (func(), error) {
|
func CreateMyDB() (func(), error) {
|
||||||
|
|
||||||
log.Printf("[DEBUG] CreateMyDB")
|
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
c, err := mysql.Run(ctx,
|
c, err := mysql.Run(ctx,
|
||||||
"mysql:8.0.40",
|
"mysql:8.0.40",
|
||||||
@@ -46,14 +44,11 @@ func CreateMyDB() (func(), error) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[DEBUG] CreateMyDB Error: %s", err)
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
talksConn, err := c.ConnectionString(ctx)
|
talksConn, err := c.ConnectionString(ctx)
|
||||||
|
|
||||||
log.Printf("[DEBUG] CreateMyDB - ConnectionString: %s, Error: %s", talksConn, err)
|
|
||||||
|
|
||||||
return GetContextDB(ctx, c, talksConn, err, "NETBIRD_STORE_ENGINE_MYSQL_DSN")
|
return GetContextDB(ctx, c, talksConn, err, "NETBIRD_STORE_ENGINE_MYSQL_DSN")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user