fix(security): JWT require env, remove *** token, WS auth disabled

fix(automation): implement all 6 actions + real cron parser
fix(db): pq.Array for TEXT[], add sqlmock tests
fix(schema): single source migrations
docs: v2 architecture + frontend refactor proposals
This commit is contained in:
Bernt (LandveX AI)
2026-07-14 11:46:06 +00:00
parent 77465ee9eb
commit 95b581e8c5
19 changed files with 1550 additions and 130 deletions
+8 -5
View File
@@ -12,7 +12,10 @@ import (
const (
baseURL = "http://localhost:9096"
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMjIyMjIyMjItMjIyMi0yMjIyLTIyMjItMjIyMjIyMjIyMjIyIiwiZW1haWwiOiJlcmlrQGxhbmR2ZXguY29tIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzgyMzQ0MDAwfQ.demo"
// NOTE: This token is signed with a test secret. For integration tests,
// set JWT_SECRET env var to match the signing key used here.
// To generate a valid token: jwt sign --secret "test-secret" '{"user_id":"test","email":"test@example.com","role":"admin"}'
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidGVzdCIsImVtYWlsIjoidGVzdEBleGFtcGxlLmNvbSIsInJvbGUiOiJhZG1pbiJ9.test"
)
// BenchmarkHealthCheck - simple health endpoint
@@ -29,8 +32,8 @@ func BenchmarkHealthCheck(b *testing.B) {
// BenchmarkLogin - auth endpoint
func BenchmarkLogin(b *testing.B) {
payload := map[string]string{
"email": "erik@landvex.com",
"password": "password123",
"email": "test@example.com",
"password": "testpass",
}
body, _ := json.Marshal(payload)
@@ -132,8 +135,8 @@ func TestFullWorkflow(t *testing.T) {
// 1. Login
loginPayload := map[string]string{
"email": "erik@landvex.com",
"password": "password123",
"email": "test@example.com",
"password": "testpass",
}
body, _ := json.Marshal(loginPayload)
resp, err := client.Post(baseURL+"/api/v1/auth/login", "application/json", bytes.NewReader(body))