diff --git a/internal/tests/suite_combinatronics_test.go b/internal/tests/suite_combinatronics_test.go index d3d18cf4..287c8b0d 100644 --- a/internal/tests/suite_combinatronics_test.go +++ b/internal/tests/suite_combinatronics_test.go @@ -43,23 +43,26 @@ import ( ) func (f *ForwarderTestSuite) TestCombinations() { - _, prefix, err := net.ParseCIDR("10.0.0.0/24") + _, prefix1, err := net.ParseCIDR("10.0.0.0/24") + f.Require().NoError(err) + _, prefix2, err := net.ParseCIDR("fc00::/7") f.Require().NoError(err) endpoints := map[string]func(ctx context.Context) verifiableEndpoint{ kernel.MECHANISM: func(ctx context.Context) verifiableEndpoint { return newKernelVerifiableEndpoint(ctx, - prefix, + prefix1, + prefix2, spiffejwt.TokenGeneratorFunc(f.x509source, f.config.MaxTokenLifetime), ) }, memif.MECHANISM: func(ctx context.Context) verifiableEndpoint { - return newMemifVerifiableEndpoint(ctx, prefix, + return newMemifVerifiableEndpoint(ctx, prefix1, prefix2, spiffejwt.TokenGeneratorFunc(f.x509source, f.config.MaxTokenLifetime), f.vppServerConn, ) }, vxlan.MECHANISM: func(ctx context.Context) verifiableEndpoint { - return newVxlanVerifiableEndpoint(ctx, prefix, + return newVxlanVerifiableEndpoint(ctx, prefix1, prefix2, spiffejwt.TokenGeneratorFunc(f.x509source, f.config.MaxTokenLifetime), f.vppServerConn, ) diff --git a/internal/tests/suite_kernel_test.go b/internal/tests/suite_kernel_test.go index 1fac66f6..8f8715d4 100644 --- a/internal/tests/suite_kernel_test.go +++ b/internal/tests/suite_kernel_test.go @@ -24,6 +24,7 @@ import ( "net" "os" + "github.com/edwarnicke/exechelper" "github.com/pkg/errors" "github.com/vishvananda/netlink" "github.com/vishvananda/netns" @@ -33,8 +34,6 @@ import ( "github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/cls" "github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/kernel" - "github.com/edwarnicke/exechelper" - "github.com/networkservicemesh/sdk/pkg/networkservice/chains/client" "github.com/networkservicemesh/sdk/pkg/networkservice/chains/endpoint" "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" @@ -72,7 +71,7 @@ type kernelVerifiableEndpoint struct { } func newKernelVerifiableEndpoint(ctx context.Context, - prefix *net.IPNet, + prefix1, prefix2 *net.IPNet, tokenGenerator token.GeneratorFunc, ) verifiableEndpoint { rootNSHandle, err := netns.Get() @@ -97,7 +96,8 @@ func newKernelVerifiableEndpoint(ctx context.Context, endpoint.WithName("kernelVerifiableEndpoint"), endpoint.WithAuthorizeServer(authorize.NewServer()), endpoint.WithAdditionalFunctionality( - point2pointipam.NewServer(prefix), + point2pointipam.NewServer(prefix1), + point2pointipam.NewServer(prefix2), mechanisms.NewServer(map[string]networkservice.NetworkServiceServer{ kernel.MECHANISM: chain.NewNetworkServiceServer( kernelmechanism.NewServer(), diff --git a/internal/tests/suite_memif_test.go b/internal/tests/suite_memif_test.go index 7d795d14..d4e17476 100644 --- a/internal/tests/suite_memif_test.go +++ b/internal/tests/suite_memif_test.go @@ -60,7 +60,7 @@ type memifVerifiableEndpoint struct { } func newMemifVerifiableEndpoint(ctx context.Context, - prefix *net.IPNet, + prefix1, prefix2 *net.IPNet, tokenGenerator token.GeneratorFunc, vppConn vpphelper.Connection, ) verifiableEndpoint { @@ -74,7 +74,8 @@ func newMemifVerifiableEndpoint(ctx context.Context, endpoint.WithAuthorizeServer(authorize.NewServer()), endpoint.WithAdditionalFunctionality( sendfd.NewServer(), - point2pointipam.NewServer(prefix), + point2pointipam.NewServer(prefix1), + point2pointipam.NewServer(prefix2), mechanisms.NewServer(map[string]networkservice.NetworkServiceServer{ memif.MECHANISM: chain.NewNetworkServiceServer( metadata.NewServer(), diff --git a/internal/tests/suite_util_test.go b/internal/tests/suite_util_test.go index 035d81fc..5cc89e42 100644 --- a/internal/tests/suite_util_test.go +++ b/internal/tests/suite_util_test.go @@ -31,7 +31,7 @@ import ( ) const ( - contextTimeout = 100 * time.Second + contextTimeout = 1000 * time.Second forwarderIP = "10.0.2.1" clientIP = "10.0.2.2" serverIP = "10.0.2.3" diff --git a/internal/tests/suite_vxlan_test.go b/internal/tests/suite_vxlan_test.go index 82f33267..5ec5f401 100644 --- a/internal/tests/suite_vxlan_test.go +++ b/internal/tests/suite_vxlan_test.go @@ -45,7 +45,7 @@ type vxlanVerifiableEndpoint struct { } func newVxlanVerifiableEndpoint(ctx context.Context, - prefix *net.IPNet, + prefix1, prefix2 *net.IPNet, tokenGenerator token.GeneratorFunc, vppConn api.Connection) verifiableEndpoint { rv := &vxlanVerifiableEndpoint{ @@ -59,7 +59,8 @@ func newVxlanVerifiableEndpoint(ctx context.Context, endpoint.WithAuthorizeServer(authorize.NewServer()), endpoint.WithAdditionalFunctionality( metadata.NewServer(), - point2pointipam.NewServer(prefix), + point2pointipam.NewServer(prefix1), + point2pointipam.NewServer(prefix2), connectioncontext.NewServer(vppConn), mechanisms.NewServer(map[string]networkservice.NetworkServiceServer{ vxlan.MECHANISM: vxlan.NewServer(vppConn, net.ParseIP(serverIP)),