feat: establish Go service and database foundation

This commit is contained in:
2026-08-20 19:33:38 +03:30
parent 552cae5f9d
commit 961980d18c
11 changed files with 341 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
package config
import "testing"
func TestLoadRequiresDatabaseURL(t *testing.T) {
t.Setenv("DATABASE_URL", "")
if _, err := Load(); err == nil {
t.Fatal("Load() error = nil, want required database url error")
}
}
func TestValidateAPIRequiresLongSecret(t *testing.T) {
t.Parallel()
cfg := Config{SessionSecret: "short"}
if err := cfg.ValidateAPI(); err == nil {
t.Fatal("ValidateAPI() error = nil, want secret length error")
}
}