Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
titolins committed Aug 30, 2024
1 parent c99c864 commit 66c1ca4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/alertmanager/alertmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ type stubReplicator struct{}
func (*stubReplicator) ReplicateStateForUser(context.Context, string, *clusterpb.Part) error {
return nil
}

func (*stubReplicator) GetPositionForUser(string) int {
return 0
}

func (*stubReplicator) ReadFullStateForUser(context.Context, string) ([]*clusterpb.FullState, error) {
return nil, nil
}
Expand All @@ -80,7 +82,7 @@ func createAlertmanagerAndSendAlerts(t *testing.T, alertGroups, groupsLimit, exp
ReplicationFactor: 1,
// We have to set this interval non-zero, though we don't need the persister to do anything.
PersisterConfig: PersisterConfig{Interval: time.Hour},
}, reg)
}, reg, &url.URL{Path: "/am"})
require.NoError(t, err)
defer am.StopAndWait()

Expand Down Expand Up @@ -165,7 +167,7 @@ func TestDispatcherLoggerInsightKey(t *testing.T) {
Replicator: &stubReplicator{},
ReplicationFactor: 1,
PersisterConfig: PersisterConfig{Interval: time.Hour},
}, reg)
}, reg, &url.URL{Path: "/am"})
require.NoError(t, err)
defer am.StopAndWait()

Expand Down Expand Up @@ -371,7 +373,7 @@ func TestSilenceLimits(t *testing.T) {
// We have set this to 1 hour, but we don't use it in this
// test as we override the broadcast function with SetBroadcast.
PersisterConfig: PersisterConfig{Interval: time.Hour},
}, r)
}, r, &url.URL{Path: "/am"})
require.NoError(t, err)
defer am.StopAndWait()

Expand Down Expand Up @@ -508,7 +510,7 @@ func TestExperimentalReceiversAPI(t *testing.T) {
Replicator: &stubReplicator{},
ReplicationFactor: 1,
PersisterConfig: PersisterConfig{Interval: time.Hour},
}, reg)
}, reg, &url.URL{Path: "/am"})
require.NoError(t, err)
defer am.StopAndWait()

Expand Down

0 comments on commit 66c1ca4

Please sign in to comment.