package app import ( "testing" "gcy_hpc_server/internal/config" "go.uber.org/zap/zaptest" ) func TestNewApp_InvalidDB(t *testing.T) { cfg := &config.Config{ ServerPort: "8080", MySQLDSN: "invalid:dsn@tcp(localhost:99999)/nonexistent?parseTime=true", SlurmAPIURL: "http://localhost:6820", SlurmUserName: "root", SlurmJWTKeyPath: "/nonexistent/jwt.key", } logger := zaptest.NewLogger(t) _, err := NewApp(cfg, logger) if err == nil { t.Fatal("expected error for invalid DSN, got nil") } }