testutils

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAlertmanagerServer

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

MockAlertmanagerServer provides a mock Alertmanager HTTP server for testing

func NewMockAlertmanagerServer

func NewMockAlertmanagerServer() *MockAlertmanagerServer

NewMockAlertmanagerServer creates a new mock Alertmanager server

func (*MockAlertmanagerServer) AddSilence

func (m *MockAlertmanagerServer) AddSilence(silence *alertmanager.Silence)

AddSilence adds a silence to the mock server's state

func (*MockAlertmanagerServer) Close

func (m *MockAlertmanagerServer) Close()

Close shuts down the mock server

func (*MockAlertmanagerServer) GetAlertmanager

func (m *MockAlertmanagerServer) GetAlertmanager() (*alertmanager.Alertmanager, error)

GetAlertmanager returns a real Alertmanager configured to use the mock server

func (*MockAlertmanagerServer) GetSilences

func (m *MockAlertmanagerServer) GetSilences() []*alertmanager.Silence

GetSilences returns all silences from the mock server

Jump to

Keyboard shortcuts

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