Update dependencies - 2022-04 (#664)

Updated  github.com/kardianos/service         https://github.com/kardianos/service/compare/v1.2.0...v1.2.1
    Updated  github.com/miekg/dns                 https://github.com/miekg/dns/compare/v1.1.43...v1.1.48
    Updated  github.com/prometheus/client_golang  https://github.com/prometheus/client_golang/compare/v1.11.0...v1.12.1
    Updated  github.com/prometheus/common         https://github.com/prometheus/common/compare/v0.32.1...v0.33.0
    Updated  github.com/stretchr/testify          https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1
    Updated  golang.org/x/crypto                  5770296d90...ae2d96664a
    Updated  golang.org/x/net                     69e39bad7d...749bd193bc
    Updated  golang.org/x/sys                     7861aae155...289d7a0edf
    Updated  golang.zx2c4.com/wireguard/windows   v0.5.1...v0.5.3
    Updated  google.golang.org/protobuf           v1.27.1...v1.28.0
This commit is contained in:
Wade Simmons 2022-04-18 12:12:25 -04:00 committed by GitHub
parent 3913062c43
commit 45d1d2b6c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 129 additions and 63 deletions

View file

@ -5,7 +5,6 @@ import (
"net"
"testing"
"github.com/golang/protobuf/proto"
"github.com/slackhq/nebula/config"
"github.com/slackhq/nebula/header"
"github.com/slackhq/nebula/iputil"
@ -20,7 +19,7 @@ func TestOldIPv4Only(t *testing.T) {
// This test ensures our new ipv6 enabled LH protobuf IpAndPorts works with the old style to enable backwards compatibility
b := []byte{8, 129, 130, 132, 80, 16, 10}
var m Ip4AndPort
err := proto.Unmarshal(b, &m)
err := m.Unmarshal(b)
assert.NoError(t, err)
assert.Equal(t, "10.1.1.1", iputil.VpnIp(m.GetIp()).String())
}
@ -36,12 +35,12 @@ func TestNewLhQuery(t *testing.T) {
assert.IsType(t, &NebulaMeta{}, a)
// It should also Marshal fine
b, err := proto.Marshal(a)
b, err := a.Marshal()
assert.Nil(t, err)
// and then Unmarshal fine
n := &NebulaMeta{}
err = proto.Unmarshal(b, n)
err = n.Unmarshal(b)
assert.Nil(t, err)
}
@ -112,7 +111,7 @@ func BenchmarkLighthouseHandleRequest(b *testing.B) {
Ip4AndPorts: nil,
},
}
p, err := proto.Marshal(req)
p, err := req.Marshal()
assert.NoError(b, err)
for n := 0; n < b.N; n++ {
lhh.HandleRequest(rAddr, 2, p, mw)
@ -127,7 +126,7 @@ func BenchmarkLighthouseHandleRequest(b *testing.B) {
Ip4AndPorts: nil,
},
}
p, err := proto.Marshal(req)
p, err := req.Marshal()
assert.NoError(b, err)
for n := 0; n < b.N; n++ {
@ -375,7 +374,7 @@ type testEncWriter struct {
func (tw *testEncWriter) SendMessageToVpnIp(t header.MessageType, st header.MessageSubType, vpnIp iputil.VpnIp, p, _, _ []byte) {
msg := &NebulaMeta{}
err := proto.Unmarshal(p, msg)
err := msg.Unmarshal(p)
if tw.metaFilter == nil || msg.Type == *tw.metaFilter {
tw.lastReply = testLhReply{
nebType: t,