mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-05 09:04:09 -04:00
[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:
@@ -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
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user