Alerting: Remove OrgID() from the Alertmanager interface (#77398)
This commit is contained in:
@@ -395,10 +395,6 @@ func (am *alertmanager) PutAlerts(_ context.Context, postableAlerts apimodels.Po
|
||||
return am.Base.PutAlerts(alerts)
|
||||
}
|
||||
|
||||
func (am *alertmanager) OrgID() int64 {
|
||||
return am.orgID
|
||||
}
|
||||
|
||||
// CleanUp removes the directory containing the alertmanager files from disk.
|
||||
func (am *alertmanager) CleanUp() {
|
||||
am.fileStore.CleanUp()
|
||||
|
||||
@@ -57,7 +57,6 @@ type Alertmanager interface {
|
||||
CleanUp()
|
||||
StopAndWait()
|
||||
Ready() bool
|
||||
OrgID() int64
|
||||
}
|
||||
|
||||
type MultiOrgAlertmanager struct {
|
||||
|
||||
@@ -286,8 +286,10 @@ func TestMultiOrgAlertmanager_AlertmanagerFor(t *testing.T) {
|
||||
{
|
||||
am, err := mam.AlertmanagerFor(2)
|
||||
require.NoError(t, err)
|
||||
internalAm, ok := am.(*alertmanager)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, "N/A", *am.GetStatus().VersionInfo.Version)
|
||||
require.Equal(t, int64(2), am.OrgID())
|
||||
require.Equal(t, int64(2), internalAm.orgID)
|
||||
}
|
||||
|
||||
// Let's now remove the previous queried organization.
|
||||
|
||||
Reference in New Issue
Block a user