diff --git a/lib/modulo_test.go b/lib/modulo_test.go index 37988e3..30f5bf4 100644 --- a/lib/modulo_test.go +++ b/lib/modulo_test.go @@ -25,10 +25,10 @@ func Test_Hash(t *testing.T) { // these are randomly generated "client ids" that are known to result in // FNV-1a 32 bit hashes 0-4 after %4 tests := [][]byte{ - []byte{0xf6, 0x85, 0x63, 0x3, 0x11, 0x80, 0x72, 0x97, 0x23, 0xa1}, - []byte{0x8c, 0x41, 0x34, 0xe1, 0x9c, 0xd, 0xfc, 0xe5, 0x41, 0x4b}, - []byte{0x54, 0xc9, 0xeb, 0x57, 0xa, 0x57, 0x14, 0x43, 0x2b, 0x19}, - []byte{0x54, 0xc5, 0x89, 0x66, 0xb2, 0xdc, 0x39, 0xf7, 0x8f, 0xa5}, + {0xf6, 0x85, 0x63, 0x3, 0x11, 0x80, 0x72, 0x97, 0x23, 0xa1}, + {0x8c, 0x41, 0x34, 0xe1, 0x9c, 0xd, 0xfc, 0xe5, 0x41, 0x4b}, + {0x54, 0xc9, 0xeb, 0x57, 0xa, 0x57, 0x14, 0x43, 0x2b, 0x19}, + {0x54, 0xc5, 0x89, 0x66, 0xb2, 0xdc, 0x39, 0xf7, 0x8f, 0xa5}, } subject := new(modulo) servers := make([]*DHCPServer, 4) diff --git a/lib/update_servers_test.go b/lib/update_servers_test.go index abd08b5..96f04f7 100644 --- a/lib/update_servers_test.go +++ b/lib/update_servers_test.go @@ -27,11 +27,11 @@ func TestDiffServerList(t *testing.T) { original: []*DHCPServer{}, updated: []*DHCPServer{ - &DHCPServer{ + { Address: net.ParseIP("1.2.3.4"), Port: 1, }, - &DHCPServer{ + { Address: net.ParseIP("5.6.7.8"), Port: 2, }, @@ -39,11 +39,11 @@ func TestDiffServerList(t *testing.T) { }, { original: []*DHCPServer{ - &DHCPServer{ + { Address: net.ParseIP("1.2.3.4"), Port: 1, }, - &DHCPServer{ + { Address: net.ParseIP("5.6.7.8"), Port: 2, }, @@ -52,13 +52,13 @@ func TestDiffServerList(t *testing.T) { }, { original: []*DHCPServer{ - &DHCPServer{ + { Address: net.ParseIP("1.2.3.4"), Port: 1, }, }, updated: []*DHCPServer{ - &DHCPServer{ + { Address: net.ParseIP("5.6.7.8"), Port: 2, },