mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-28 09:39:05 +02:00
Harden the elevation trust checks and narrow what one authorization applies
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package daemonaddr
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCarriesIdentity(t *testing.T) {
|
||||
tests := []struct {
|
||||
@@ -19,9 +23,7 @@ func TestCarriesIdentity(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.addr, func(t *testing.T) {
|
||||
if got := CarriesIdentity(tt.addr); got != tt.want {
|
||||
t.Errorf("CarriesIdentity(%q) = %v, want %v", tt.addr, got, tt.want)
|
||||
}
|
||||
assert.Equal(t, tt.want, CarriesIdentity(tt.addr), "address %q", tt.addr)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user