From 64ede5dbef456d0d02d0cc578c6396cecae684fc Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Fri, 2 Sep 2022 09:13:07 +0200 Subject: [PATCH] Move namespaces unit tests to net/netip --- namespaces_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/namespaces_test.go b/namespaces_test.go index 6f33585f..42b8de42 100644 --- a/namespaces_test.go +++ b/namespaces_test.go @@ -1,11 +1,11 @@ package headscale import ( + "net/netip" "testing" "gopkg.in/check.v1" "gorm.io/gorm" - "inet.af/netaddr" ) func (s *Suite) TestCreateAndDestroyNamespace(c *check.C) { @@ -146,7 +146,7 @@ func (s *Suite) TestGetMapResponseUserProfiles(c *check.C) { NamespaceID: namespaceShared1.ID, Namespace: *namespaceShared1, RegisterMethod: RegisterMethodAuthKey, - IPAddresses: []netaddr.IP{netaddr.MustParseIP("100.64.0.1")}, + IPAddresses: []netip.Addr{netip.MustParseAddr("100.64.0.1")}, AuthKeyID: uint(preAuthKeyShared1.ID), } app.db.Save(machineInShared1) @@ -163,7 +163,7 @@ func (s *Suite) TestGetMapResponseUserProfiles(c *check.C) { NamespaceID: namespaceShared2.ID, Namespace: *namespaceShared2, RegisterMethod: RegisterMethodAuthKey, - IPAddresses: []netaddr.IP{netaddr.MustParseIP("100.64.0.2")}, + IPAddresses: []netip.Addr{netip.MustParseAddr("100.64.0.2")}, AuthKeyID: uint(preAuthKeyShared2.ID), } app.db.Save(machineInShared2) @@ -180,7 +180,7 @@ func (s *Suite) TestGetMapResponseUserProfiles(c *check.C) { NamespaceID: namespaceShared3.ID, Namespace: *namespaceShared3, RegisterMethod: RegisterMethodAuthKey, - IPAddresses: []netaddr.IP{netaddr.MustParseIP("100.64.0.3")}, + IPAddresses: []netip.Addr{netip.MustParseAddr("100.64.0.3")}, AuthKeyID: uint(preAuthKeyShared3.ID), } app.db.Save(machineInShared3) @@ -197,7 +197,7 @@ func (s *Suite) TestGetMapResponseUserProfiles(c *check.C) { NamespaceID: namespaceShared1.ID, Namespace: *namespaceShared1, RegisterMethod: RegisterMethodAuthKey, - IPAddresses: []netaddr.IP{netaddr.MustParseIP("100.64.0.4")}, + IPAddresses: []netip.Addr{netip.MustParseAddr("100.64.0.4")}, AuthKeyID: uint(preAuthKey2Shared1.ID), } app.db.Save(machine2InShared1)