mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-08 22:36:37 +08:00
Fix login stalls and bot redemption routing
This commit is contained in:
@@ -75,7 +75,7 @@ func TestEnvOverride(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadAllowsSingleConnectionDatabaseConfig(t *testing.T) {
|
||||
func TestLoadAllowsExplicitSingleConnectionDatabaseConfig(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
wd, _ := os.Getwd()
|
||||
defer func() { _ = os.Chdir(wd) }()
|
||||
@@ -90,7 +90,10 @@ func TestLoadAllowsSingleConnectionDatabaseConfig(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Load() error: %v", err)
|
||||
}
|
||||
if cfg.Database.MaxOpenConns != defaultDatabaseMaxOpenConns {
|
||||
t.Fatalf("expected MaxOpenConns=1 to remain at safe default %d, got %d", defaultDatabaseMaxOpenConns, cfg.Database.MaxOpenConns)
|
||||
if cfg.Database.MaxOpenConns != 1 {
|
||||
t.Fatalf("expected explicit MaxOpenConns=1 to be preserved, got %d", cfg.Database.MaxOpenConns)
|
||||
}
|
||||
if cfg.Database.MaxIdleConns != 1 {
|
||||
t.Fatalf("expected explicit MaxIdleConns=1 to be preserved, got %d", cfg.Database.MaxIdleConns)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user