utils

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryCount       = 10
	RetryWaitTime    = 5 * time.Second
	RetryMaxWaitTime = 1 * time.Minute
)

Variables

View Source
var (
	MockManagementPlaneAPIAddress          string
	AuxiliaryMockManagementPlaneAPIAddress string
)
View Source
var (
	Container                                 testcontainers.Container
	MockManagementPlaneGrpcContainer          testcontainers.Container
	AuxiliaryMockManagementPlaneGrpcContainer testcontainers.Container
	MockManagementPlaneGrpcAddress            string
	AuxiliaryMockManagementPlaneGrpcAddress   string
)

Functions

func ClearManagementPlaneResponses

func ClearManagementPlaneResponses(t *testing.T, mockManagementPlaneAPIAddress string)

func CurrentFileOverview added in v3.2.0

func CurrentFileOverview(t *testing.T, nginxInstanceID, mockManagementPlaneAPIAddress string) *mpi.FileOverview

func ManagementPlaneResponses

func ManagementPlaneResponses(t *testing.T, numberOfExpectedResponses int,
	mockManagementPlaneAPIAddress string,
) []*mpi.DataPlaneResponse

func PerformConfigApply

func PerformConfigApply(t *testing.T, nginxInstanceID, mockManagementPlaneAPIAddress string)

func PerformInvalidConfigApply

func PerformInvalidConfigApply(t *testing.T, nginxInstanceID string)

func SetupConnectionTest

func SetupConnectionTest(tb testing.TB, expectNoErrorsInLogs, nginxless, auxiliaryServer bool,
	agentConfig string,
) func(tb testing.TB)

func VerifyConnection

func VerifyConnection(t *testing.T, instancesLength int, mockManagementPlaneAPIAddress string) string

func VerifyUpdateDataPlaneHealth

func VerifyUpdateDataPlaneHealth(t *testing.T, mockManagementPlaneAPIAddress string)

func VerifyUpdateDataPlaneStatus

func VerifyUpdateDataPlaneStatus(t *testing.T, mockManagementPlaneAPIAddress string)

Types

type ConnectionRequest

type ConnectionRequest struct {
	ConnectionRequest *mpi.CreateConnectionRequest `json:"connectionRequest"`
}

type Instance

type Instance struct {
	InstanceMeta    *mpi.InstanceMeta    `json:"instance_meta"`
	InstanceRuntime *mpi.InstanceRuntime `json:"instance_runtime"`
}

type NginxUpdateDataPlaneHealthRequest

type NginxUpdateDataPlaneHealthRequest struct {
	MessageMeta *mpi.MessageMeta `json:"message_meta"`
	Instances   []Instance       `json:"instances"`
}

type UpdateDataPlaneStatusRequest

type UpdateDataPlaneStatusRequest struct {
	UpdateDataPlaneStatusRequest NginxUpdateDataPlaneHealthRequest `json:"updateDataPlaneStatusRequest"`
}

Jump to

Keyboard shortcuts

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