Revision 9368f21c53b7aa96b8743a0b8b79a0ab44d963c6 authored by Jarno Rajahalme on 20 June 2024, 21:26:05 UTC, committed by Nathan Sweet on 21 June 2024, 15:57:37 UTC
AllowsIdentity is only used for testing, move it there. Add the missing InvertedPortMask field on the wildcard port lookup. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
1 parent d97069c
ipv4_test.go
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
package types
import (
"net"
"net/netip"
"testing"
"github.com/stretchr/testify/require"
)
var testIPv4Address IPv4 = [4]byte{10, 0, 0, 2}
func TestIP(t *testing.T) {
var expectedAddress net.IP = []byte{10, 0, 0, 2}
result := testIPv4Address.IP()
require.EqualValues(t, expectedAddress, result)
}
func TestAddr(t *testing.T) {
expectedAddress := netip.MustParseAddr("10.0.0.2")
result := testIPv4Address.Addr()
require.EqualValues(t, expectedAddress, result)
}
func TestString(t *testing.T) {
expectedStr := "10.0.0.2"
result := testIPv4Address.String()
require.Equal(t, expectedStr, result)
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...