Pull request 2412: AGDNS-2743-auth-fix-tests

Merge in DNS/adguard-home from AGDNS-2743-auth-fix-tests to master

Squashed commit of the following:

commit 954dce8d39c0bf8c03cf3e5fea7b6c6719ff28ac
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon May 19 17:43:02 2025 +0300

    home: auth fix tests
This commit is contained in:
Stanislav Chzhen
2025-05-19 18:24:48 +03:00
parent 01ecbb6eed
commit 7d1b37d70a

View File

@@ -165,6 +165,7 @@ func TestAuth_ServeHTTP_auth(t *testing.T) {
PasswordHash: string(passwordHash),
}}
auth := InitAuth(sessionsDB, users, testTTL, nil, nil)
t.Cleanup(auth.Close)
globalContext.auth = auth
mux := http.NewServeMux()
@@ -297,6 +298,7 @@ func TestAuth_ServeHTTP_logout(t *testing.T) {
PasswordHash: string(passwordHash),
}}
auth := InitAuth(sessionsDB, users, testTTL, nil, nil)
t.Cleanup(auth.Close)
globalContext.auth = auth
mux := http.NewServeMux()