refactor: comentarii strict functionale, fara referinte PRD/stories
Curatare globala a comentariilor si docstring-urilor (app, tools, teste, scripturi): eliminate referintele la PRD-uri, US-xxx, task-uri istorice si review-uri; pastrata doar informatia functionala, formulata scurt. Regula adaugata in CLAUDE.md (sectiunea Stil). Fara modificari de cod sau comportament. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"""Teste T1: creds durabile per-cont (per-env, US-013) + worker re-login fallback + gate purjare.
|
||||
"""Creds durabile per-cont (per-env) + worker re-login fallback + gate purjare.
|
||||
|
||||
Verify:
|
||||
(a) Serie web, worker restart (sesiune goala), token expirat -> re-login din accounts -> trimite.
|
||||
(b) Coada MIXTA API(efemer)+web(durabil): dupa login web, submission-urile API tot se trimit
|
||||
(purjarea nu le-a rupt prematur).
|
||||
|
||||
US-013: accounts.rar_creds_enc (legacy) a fost dropata; sloturile per-env sunt singura sursa.
|
||||
accounts.rar_creds_enc (legacy) a fost dropata; sloturile per-env sunt singura sursa.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -83,7 +83,7 @@ def test_creds_from_account_fallback(env, monkeypatch):
|
||||
conn = get_connection()
|
||||
try:
|
||||
enc = encrypt_creds({"email": "web@test.ro", "password": "webpass"})
|
||||
# US-013: scrie in slotul per-env test (slotul legacy rar_creds_enc dropat)
|
||||
# scrie in slotul per-env test (slotul legacy rar_creds_enc dropat)
|
||||
conn.execute(
|
||||
"UPDATE accounts SET rar_creds_test_enc=?, rar_test_enabled=1 WHERE id=1", (enc,)
|
||||
)
|
||||
@@ -122,7 +122,7 @@ def test_worker_relogin_dupa_restart(env, monkeypatch):
|
||||
conn = get_connection()
|
||||
try:
|
||||
enc = encrypt_creds({"email": "web@test.ro", "password": "webpass"})
|
||||
# US-013: scrie in slotul per-env test
|
||||
# scrie in slotul per-env test
|
||||
conn.execute(
|
||||
"UPDATE accounts SET rar_creds_test_enc=?, rar_test_enabled=1 WHERE id=1", (enc,)
|
||||
)
|
||||
@@ -152,7 +152,7 @@ def test_coada_mixta_api_web(env, monkeypatch):
|
||||
1. S1 = submission API cu creds efemere in submissions.rar_creds_enc
|
||||
2. S2 = submission WEB fara creds (foloseste accounts.rar_creds_test_enc per-env)
|
||||
3. Login cu creds S1 -> purjare S1.rar_creds_enc (pe submissions) -> OK (worker are token)
|
||||
4. S2 tot se poate procesa (creds din accounts per-env, US-013)
|
||||
4. S2 tot se poate procesa (creds din accounts per-env)
|
||||
"""
|
||||
import app.worker.__main__ as w
|
||||
from app.crypto import encrypt_creds
|
||||
@@ -162,7 +162,7 @@ def test_coada_mixta_api_web(env, monkeypatch):
|
||||
|
||||
conn = get_connection()
|
||||
try:
|
||||
# Creds durabile pentru contul web (slotul per-env, US-013)
|
||||
# Creds durabile pentru contul web (slotul per-env)
|
||||
enc_web = encrypt_creds({"email": "web@test.ro", "password": "webpass"})
|
||||
conn.execute(
|
||||
"UPDATE accounts SET rar_creds_test_enc=?, rar_test_enabled=1 WHERE id=1", (enc_web,)
|
||||
@@ -209,7 +209,7 @@ def client(env):
|
||||
|
||||
|
||||
def test_endpoint_set_rar_creds(client, env):
|
||||
"""POST /v1/conturi/rar-creds seteaza creds criptate in slotul per-env (US-013)."""
|
||||
"""POST /v1/conturi/rar-creds seteaza creds criptate in slotul per-env."""
|
||||
from app.crypto import decrypt_creds
|
||||
from app.db import get_connection
|
||||
|
||||
@@ -235,7 +235,7 @@ def test_endpoint_set_rar_creds(client, env):
|
||||
|
||||
|
||||
def test_endpoint_delete_rar_creds(client, env):
|
||||
"""DELETE /v1/conturi/rar-creds sterge creds durabile (ambele sloturi per-env, US-013)."""
|
||||
"""DELETE /v1/conturi/rar-creds sterge creds durabile (ambele sloturi per-env)."""
|
||||
# Mai intai seteaza pe test si prod
|
||||
client.post("/v1/conturi/rar-creds", json={"email": "u@test.ro", "password": "pass123", "rar_target": "test"})
|
||||
client.post("/v1/conturi/rar-creds", json={"email": "u@prod.ro", "password": "pass456", "rar_target": "prod"})
|
||||
@@ -257,7 +257,7 @@ def test_endpoint_delete_rar_creds(client, env):
|
||||
|
||||
|
||||
def test_gate_purjare_nu_sterge_accounts(env, monkeypatch):
|
||||
"""Gate purjare T1: stergerea submissions.rar_creds_enc NU atinge accounts per-env (US-013)."""
|
||||
"""Gate purjare: stergerea submissions.rar_creds_enc NU atinge accounts per-env."""
|
||||
import app.worker.__main__ as w
|
||||
from app.crypto import encrypt_creds
|
||||
from app.db import get_connection
|
||||
@@ -267,7 +267,7 @@ def test_gate_purjare_nu_sterge_accounts(env, monkeypatch):
|
||||
conn = get_connection()
|
||||
try:
|
||||
enc = encrypt_creds({"email": "u@test.ro", "password": "p"})
|
||||
# US-013: scrie in slotul per-env test
|
||||
# scrie in slotul per-env test
|
||||
conn.execute(
|
||||
"UPDATE accounts SET rar_creds_test_enc=?, rar_test_enabled=1 WHERE id=1", (enc,)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user