helpers

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsElements

func ContainsElements(elements ...string) types.GomegaMatcher

func GenerateBucketName

func GenerateBucketName(prefix string) string

func GenerateContainerName

func GenerateContainerName(prefix string) string

func GenerateTestFile

func GenerateTestFile(name string, size int) []byte

func HaveKeyWithValue

func HaveKeyWithValue(key, value string) types.GomegaMatcher

func HaveLen

func HaveLen(expectedLen int) types.GomegaMatcher

func HavePrefix

func HavePrefix(prefix string) types.GomegaMatcher

Types

type ContainsElementsMatcher

type ContainsElementsMatcher struct {
	// contains filtered or unexported fields
}

func (*ContainsElementsMatcher) FailureMessage

func (m *ContainsElementsMatcher) FailureMessage(actual interface{}) (message string)

func (*ContainsElementsMatcher) Match

func (m *ContainsElementsMatcher) Match(actual interface{}) (success bool, err error)

func (*ContainsElementsMatcher) NegatedFailureMessage

func (m *ContainsElementsMatcher) NegatedFailureMessage(actual interface{}) (message string)

type DockerManager

type DockerManager struct {
	// contains filtered or unexported fields
}

func NewDockerManager

func NewDockerManager() *DockerManager

func (*DockerManager) AllHealthy

func (dm *DockerManager) AllHealthy() bool

func (*DockerManager) AzuriteBlobPort

func (dm *DockerManager) AzuriteBlobPort() int

func (*DockerManager) AzuriteQueuePort

func (dm *DockerManager) AzuriteQueuePort() int

func (*DockerManager) AzuriteTablePort

func (dm *DockerManager) AzuriteTablePort() int

func (*DockerManager) GCSPort

func (dm *DockerManager) GCSPort() int

func (*DockerManager) SFTPPort

func (dm *DockerManager) SFTPPort() int

func (*DockerManager) SMBPort

func (dm *DockerManager) SMBPort() int

func (*DockerManager) StartAll

func (dm *DockerManager) StartAll(ctx context.Context) error

func (*DockerManager) StopAll

func (dm *DockerManager) StopAll(ctx context.Context) error

type HasLenMatcher

type HasLenMatcher struct {
	// contains filtered or unexported fields
}

func (*HasLenMatcher) FailureMessage

func (m *HasLenMatcher) FailureMessage(actual interface{}) (message string)

func (*HasLenMatcher) Match

func (m *HasLenMatcher) Match(actual interface{}) (success bool, err error)

func (*HasLenMatcher) NegatedFailureMessage

func (m *HasLenMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HaveKeyWithValueMatcher

type HaveKeyWithValueMatcher struct {
	// contains filtered or unexported fields
}

func (*HaveKeyWithValueMatcher) FailureMessage

func (m *HaveKeyWithValueMatcher) FailureMessage(actual interface{}) (message string)

func (*HaveKeyWithValueMatcher) Match

func (m *HaveKeyWithValueMatcher) Match(actual interface{}) (success bool, err error)

func (*HaveKeyWithValueMatcher) NegatedFailureMessage

func (m *HaveKeyWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string)

type PrefixMatcher

type PrefixMatcher struct {
	// contains filtered or unexported fields
}

func (*PrefixMatcher) FailureMessage

func (m *PrefixMatcher) FailureMessage(actual interface{}) (message string)

func (*PrefixMatcher) Match

func (m *PrefixMatcher) Match(actual interface{}) (success bool, err error)

func (*PrefixMatcher) NegatedFailureMessage

func (m *PrefixMatcher) NegatedFailureMessage(actual interface{}) (message string)

type ServiceManager

type ServiceManager struct {
	// contains filtered or unexported fields
}

func NewServiceManager

func NewServiceManager() *ServiceManager

func (*ServiceManager) AllHealthy

func (sm *ServiceManager) AllHealthy() bool

func (*ServiceManager) LocalStackURL

func (sm *ServiceManager) LocalStackURL() string

func (*ServiceManager) LokiURL

func (sm *ServiceManager) LokiURL() string

func (*ServiceManager) OpenSearchURL

func (sm *ServiceManager) OpenSearchURL() string

func (*ServiceManager) PostgresURL

func (sm *ServiceManager) PostgresURL() string

func (*ServiceManager) RedisURL

func (sm *ServiceManager) RedisURL() string

func (*ServiceManager) StartAll

func (sm *ServiceManager) StartAll(ctx context.Context) error

func (*ServiceManager) StopAll

func (sm *ServiceManager) StopAll(ctx context.Context) error

func (*ServiceManager) TmpDir

func (sm *ServiceManager) TmpDir() string

type TestAssertion

type TestAssertion struct {
	Name      string
	Check     func() error
	OnFailure string
}

func NewTestAssertion

func NewTestAssertion(name string, check func() error) *TestAssertion

func (*TestAssertion) Execute

func (ta *TestAssertion) Execute() error

func (*TestAssertion) WithFailureMessage

func (ta *TestAssertion) WithFailureMessage(msg string) *TestAssertion

type TestLog

type TestLog struct {
	Timestamp time.Time
	Level     string
	Message   string
	Labels    map[string]string
	Fields    map[string]interface{}
}

func GenerateTestLogs

func GenerateTestLogs(count int) []TestLog

func GenerateTestLogsWithLevel

func GenerateTestLogsWithLevel(count int, level string) []TestLog

func GenerateTestLogsWithService

func GenerateTestLogsWithService(count int, service string) []TestLog

type TestLogBatch

type TestLogBatch struct {
	Logs []TestLog
}

Jump to

Keyboard shortcuts

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