diff --git a/pkg/agent/ip.go b/pkg/agent/ip.go index c41c86409205c700bd1ecab19a1b867b2d4c9597..b37a66fa3ce910281c7dd4e8f03805929c53c670 100644 --- a/pkg/agent/ip.go +++ b/pkg/agent/ip.go @@ -18,10 +18,10 @@ var ( // fetchAgentIP guesses the non-loopback IP address of the Agent host, according to the // user-provided configuration: -// - If AgentIP is provided, this value is used whatever is the real IP of the Agent. -// - AgentIPIface specifies which interface this function should look into in order to pickup an address. -// - AgentIPType specifies which type of IP address should the agent pickup ("any" to pickup whichever -// ipv4 or ipv6 address is found first) +// - If AgentIP is provided, this value is used whatever is the real IP of the Agent. +// - AgentIPIface specifies which interface this function should look into in order to pickup an address. +// - AgentIPType specifies which type of IP address should the agent pickup ("any" to pickup whichever +// ipv4 or ipv6 address is found first) func fetchAgentIP(cfg *Config) (net.IP, error) { if cfg.AgentIP != "" { if ip := net.ParseIP(cfg.AgentIP); ip != nil { diff --git a/pkg/exporter/kafka_proto_test.go b/pkg/exporter/kafka_proto_test.go index 91c53e32ed97bb622030e779fbed301fbe66772e..0093df1b255d004cb8e330af929eb32ba295db07 100644 --- a/pkg/exporter/kafka_proto_test.go +++ b/pkg/exporter/kafka_proto_test.go @@ -50,9 +50,9 @@ func TestProtoConversion(t *testing.T) { require.NoError(t, proto.Unmarshal(wc.messages[0].Value, &r)) assert.EqualValues(t, 3, r.EthProtocol) assert.EqualValues(t, 1, r.Direction) - assert.EqualValues(t, 0xaabbccddeeff, r.DataLink.SrcMac) - assert.EqualValues(t, 0x112233445566, r.DataLink.DstMac) - assert.EqualValues(t, 0xC0010203 /* 192.1.2.3 */, r.Network.SrcAddr.GetIpv4()) + assert.EqualValues(t, uint64(0xaabbccddeeff), r.DataLink.SrcMac) + assert.EqualValues(t, uint64(0x112233445566), r.DataLink.DstMac) + assert.EqualValues(t, uint64(0xC0010203) /* 192.1.2.3 */, r.Network.SrcAddr.GetIpv4()) assert.EqualValues(t, 0x7F030201 /* 127.3.2.1 */, r.Network.DstAddr.GetIpv4()) assert.EqualValues(t, 4321, r.Transport.SrcPort) assert.EqualValues(t, 1234, r.Transport.DstPort) diff --git a/pkg/grpc/grpc_test.go b/pkg/grpc/grpc_test.go index fef4b3495e06b1cfa19c1f8af108dd71c8b0eded..eb2184ab209d24d886a30076352bc95ec97b6de1 100644 --- a/pkg/grpc/grpc_test.go +++ b/pkg/grpc/grpc_test.go @@ -69,7 +69,7 @@ func TestGRPCCommunication(t *testing.T) { assert.EqualValues(t, 456, r.Bytes) assert.EqualValues(t, 0x11223344, r.GetNetwork().GetSrcAddr().GetIpv4()) assert.EqualValues(t, 0x55667788, r.GetNetwork().GetDstAddr().GetIpv4()) - assert.EqualValues(t, 0xaabbccdd, r.GetAgentIp().GetIpv4()) + assert.EqualValues(t, uint64(0xaabbccdd), r.GetAgentIp().GetIpv4()) select { case rs = <-serverOut: case <-time.After(timeout): @@ -80,8 +80,8 @@ func TestGRPCCommunication(t *testing.T) { assert.EqualValues(t, 789, r.EthProtocol) assert.EqualValues(t, 101, r.Bytes) assert.EqualValues(t, 0x44332211, r.GetNetwork().GetSrcAddr().GetIpv4()) - assert.EqualValues(t, 0x88776655, r.GetNetwork().GetDstAddr().GetIpv4()) - assert.EqualValues(t, 0xddccbbaa, r.GetAgentIp().GetIpv4()) + assert.EqualValues(t, uint64(0x88776655), r.GetNetwork().GetDstAddr().GetIpv4()) + assert.EqualValues(t, uint64(0xddccbbaa), r.GetAgentIp().GetIpv4()) select { case rs = <-serverOut: