[client] Change priority between local and dns route handlers (#5106)

* Change priority between local and dns route handlers

* update priority tests
This commit is contained in:
Maycon Santos
2026-01-15 17:30:10 +01:00
committed by GitHub
parent efb954b7d6
commit 291e640b28
2 changed files with 27 additions and 27 deletions

View File

@@ -16,8 +16,8 @@ import (
const ( const (
PriorityMgmtCache = 150 PriorityMgmtCache = 150
PriorityLocal = 100 PriorityDNSRoute = 100
PriorityDNSRoute = 75 PriorityLocal = 75
PriorityUpstream = 50 PriorityUpstream = 50
PriorityDefault = 1 PriorityDefault = 1
PriorityFallback = -100 PriorityFallback = -100

View File

@@ -2052,7 +2052,7 @@ func TestLocalResolverPriorityInServer(t *testing.T) {
func TestLocalResolverPriorityConstants(t *testing.T) { func TestLocalResolverPriorityConstants(t *testing.T) {
// Test that priority constants are ordered correctly // Test that priority constants are ordered correctly
assert.Greater(t, PriorityLocal, PriorityDNSRoute, "Local priority should be higher than DNS route") assert.Greater(t, PriorityDNSRoute, PriorityLocal, "DNS Route should be higher than Local priority")
assert.Greater(t, PriorityLocal, PriorityUpstream, "Local priority should be higher than upstream") assert.Greater(t, PriorityLocal, PriorityUpstream, "Local priority should be higher than upstream")
assert.Greater(t, PriorityUpstream, PriorityDefault, "Upstream priority should be higher than default") assert.Greater(t, PriorityUpstream, PriorityDefault, "Upstream priority should be higher than default")