Pull request 2401: AGDNS-2817-fix-tls-test

Merge in DNS/adguard-home from AGDNS-2817-fix-tls-test to master

Squashed commit of the following:

commit 8cd435e05b6bfb988be90475b28db6703a763b2e
Merge: b9544ba8b af7c2e3a9
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 29 19:54:17 2025 +0300

    Merge branch 'master' into AGDNS-2817-fix-tls-test

commit b9544ba8b9097637a3b217142f092a242c819a63
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Apr 28 15:28:05 2025 +0300

    home: fix tls test
This commit is contained in:
Stanislav Chzhen
2025-04-29 20:03:03 +03:00
parent af7c2e3a9d
commit e5d0f0b119

View File

@@ -204,6 +204,8 @@ func assertCertSerialNumber(tb testing.TB, conf *tlsConfigSettings, wantSN int64
func TestTLSManager_Reload(t *testing.T) {
storeGlobals(t)
config.DNS.Port = 0
var (
logger = slogutil.NewDiscardLogger()
ctx = testutil.ContextWithTimeout(t, testTimeout)
@@ -260,6 +262,10 @@ func TestTLSManager_Reload(t *testing.T) {
m.reload(ctx)
// The [tlsManager.reload] method will start the DNS server and it should be
// stopped after the test ends.
testutil.CleanupAndRequireSuccess(t, globalContext.dnsServer.Stop)
conf = m.config()
assertCertSerialNumber(t, conf, snAfter)
}