Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( At = testutils.At Between = testutils.Between Alert = testutils.Alert NewWebhook = testutils.NewWebhook )
var CompareCollectors = testutils.CompareCollectors
Functions ¶
This section is empty.
Types ¶
type AcceptanceOpts ¶
type AcceptanceOpts = testutils.AcceptanceOpts
Re-export common types and functions from testutils.
type AcceptanceTest ¶
type AcceptanceTest struct {
*testutils.AcceptanceTest
}
AcceptanceTest wraps testutils.AcceptanceTest for API-based testing.
func NewAcceptanceTest ¶
func NewAcceptanceTest(t *testing.T, opts *AcceptanceOpts) *AcceptanceTest
NewAcceptanceTest returns a new acceptance test.
func (*AcceptanceTest) AlertmanagerCluster ¶
func (t *AcceptanceTest) AlertmanagerCluster(conf string, size int) *AlertmanagerCluster
AlertmanagerCluster returns a new AlertmanagerCluster.
type Alertmanager ¶
type Alertmanager struct {
*testutils.Alertmanager
}
Alertmanager wraps testutils.Alertmanager and adds API-specific methods.
func (*Alertmanager) DelSilence ¶
func (am *Alertmanager) DelSilence(at float64, sil *TestSilence)
DelSilence deletes the silence with the sid at the given time.
func (*Alertmanager) Push ¶
func (am *Alertmanager) Push(at float64, alerts ...*TestAlert)
Push declares alerts that are to be pushed to the Alertmanager server at a relative point in time.
func (*Alertmanager) SetSilence ¶
func (am *Alertmanager) SetSilence(at float64, sil *TestSilence)
SetSilence updates or creates the given Silence.
type AlertmanagerCluster ¶
type AlertmanagerCluster struct {
*testutils.AlertmanagerCluster
}
AlertmanagerCluster wraps testutils.AlertmanagerCluster and adds API-specific methods.
func (*AlertmanagerCluster) DelSilence ¶
func (amc *AlertmanagerCluster) DelSilence(at float64, sil *TestSilence)
DelSilence deletes the silence with the sid at the given time.
func (*AlertmanagerCluster) Members ¶ added in v0.17.0
func (amc *AlertmanagerCluster) Members() []*Alertmanager
Members returns the underlying Alertmanager instances wrapped for API testing.
func (*AlertmanagerCluster) Push ¶
func (amc *AlertmanagerCluster) Push(at float64, alerts ...*TestAlert)
Push declares alerts that are to be pushed to the Alertmanager servers at a relative point in time.
func (*AlertmanagerCluster) SetSilence ¶
func (amc *AlertmanagerCluster) SetSilence(at float64, sil *TestSilence)
SetSilence updates or creates the given Silence.
type MockWebhook ¶
type MockWebhook = testutils.MockWebhook
Re-export common types and functions from testutils.
type TestSilence ¶
type TestSilence struct {
// contains filtered or unexported fields
}
TestSilence models a model.Silence with relative times.
func Silence ¶
func Silence(start, end float64) *TestSilence
Silence creates a new TestSilence active for the relative interval given by start and end.
func (*TestSilence) Match ¶
func (s *TestSilence) Match(v ...string) *TestSilence
Match adds a new plain matcher to the silence.
func (*TestSilence) MatchRE ¶
func (s *TestSilence) MatchRE(v ...string) *TestSilence
MatchRE adds a new regex matcher to the silence.