mirror of
https://github.com/juanfont/headscale.git
synced 2025-10-17 20:21:50 +00:00
use cmp.Diff instead of reflect.DeepEqual
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:

committed by
Kristoffer Dalby

parent
665a3cc666
commit
23a3adf8d2
@@ -2,9 +2,9 @@ package util
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"go4.org/netipx"
|
||||
)
|
||||
|
||||
@@ -111,8 +111,8 @@ func Test_parseIPSet(t *testing.T) {
|
||||
|
||||
return
|
||||
}
|
||||
if !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("parseIPSet() = %v, want %v", got, tt.want)
|
||||
if diff := cmp.Diff(tt.want, got); diff != "" {
|
||||
t.Errorf("parseIPSet() = (-want +got):\n%s", diff)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user