chore: update verify_login test exact expectation to match new deployed hash

This commit is contained in:
Tiago Yamamoto 2025-12-24 17:25:12 -03:00
parent 37512a7d1c
commit 4605142bc7

View file

@ -28,7 +28,8 @@ func TestVerifyLogin(t *testing.T) {
if dbURL == "" { if dbURL == "" {
dbURL = "postgres://yuki:xl1zfmr6e9bb@db-60059.dc-sp-1.absamcloud.com:26868/gohorsejobs_dev?sslmode=require" dbURL = "postgres://yuki:xl1zfmr6e9bb@db-60059.dc-sp-1.absamcloud.com:26868/gohorsejobs_dev?sslmode=require"
} }
pepper := "gohorse-pepper" // Updated to match deployed backend .env
pepper := "some-random-string-for-password-hashing"
password := "Admin@2025!" password := "Admin@2025!"
// Connect DB // Connect DB
@ -52,7 +53,7 @@ func TestVerifyLogin(t *testing.T) {
fmt.Printf("🔍 Found hash in DB: %s\n", hash) fmt.Printf("🔍 Found hash in DB: %s\n", hash)
// Check expected hash (from migration 010) // Check expected hash (from migration 010)
expectedHash := "$2a$10$/AodyEEQtKCjdeNThEUFee6QE/KvEBTzi1AnqQ78nwavkT1XFnw/6" expectedHash := "$2a$10$x7AN/r8MpVylJnd2uq4HT.lZbbNCqHuBuadpsr4xV.KlsleITmR5."
if hash != expectedHash { if hash != expectedHash {
t.Logf("⚠️ Hash in DB doesn't match migration 010 hash") t.Logf("⚠️ Hash in DB doesn't match migration 010 hash")
t.Logf(" Expected: %s", expectedHash) t.Logf(" Expected: %s", expectedHash)