testutil

package
v1.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2025 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Copyright 2025 SGNL.ai, Inc.

Copyright 2025 SGNL.ai, Inc.

Copyright 2025 SGNL.ai, Inc.

Index

Constants

View Source
const (
	LDAPPort  = "389"
	LDAPSPort = "636"
)

Variables

View Source
var (
	TestConnectorInfo = connector.ConnectorInfo{
		ID:       "test-connector-id",
		ClientID: "test-client-id",
		TenantID: "test-tenant-id",
	}
)

Functions

func GenPtr

func GenPtr[T any](v T) *T

func ProxyTestCommonSetup added in v1.39.0

func ProxyTestCommonSetup(t *testing.T, proxy *TestProxyServer) (grpc_proxy_v1.ProxyServiceClient, func())

func Run

func Run(t *testing.T, s suite.TestingSuite)

Types

type CommonSuite

type CommonSuite struct {
	suite.Suite
}

func (*CommonSuite) StartLDAPServer

func (s *CommonSuite) StartLDAPServer(ctx context.Context, isLDAPS bool) (testcontainers.Container, nat.Port)

StartLDAPServer runs an instance of active directory over LDAP protocol in a local container for testing. It returns the container and open port. May fail the test internally if setup fails.

type TestProxyServer added in v1.39.0

type TestProxyServer struct {
	GrpcErr        error
	ResponseErrStr *string
	Response       *string
	Ci             *connector.ConnectorInfo
	IsLDAPResponse bool
	IsSQLResponse  bool
	grpc_proxy_v1.UnimplementedProxyServiceServer
}

func (*TestProxyServer) ProxyRequest added in v1.39.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL