@ -63,7 +63,7 @@ func TestNewAlertmanager(t *testing.T) {
TenantID : test . tenantID ,
TenantID : test . tenantID ,
BasicAuthPassword : test . password ,
BasicAuthPassword : test . password ,
}
}
am , err := NewAlertmanager ( cfg , test . orgID )
am , err := NewAlertmanager ( cfg , test . orgID , nil )
if test . expErr != "" {
if test . expErr != "" {
require . EqualError ( tt , err , test . expErr )
require . EqualError ( tt , err , test . expErr )
return
return
@ -93,7 +93,7 @@ func TestApplyConfig(t *testing.T) {
cfg := AlertmanagerConfig {
cfg := AlertmanagerConfig {
URL : server . URL ,
URL : server . URL ,
}
}
am , err := NewAlertmanager ( cfg , 1 )
am , err := NewAlertmanager ( cfg , 1 , nil )
require . NoError ( t , err )
require . NoError ( t , err )
config := & ngmodels . AlertConfiguration { }
config := & ngmodels . AlertConfiguration { }
@ -144,7 +144,7 @@ func TestIntegrationRemoteAlertmanagerApplyConfigOnlyUploadsOnce(t *testing.T) {
}
}
ctx := context . Background ( )
ctx := context . Background ( )
am , err := NewAlertmanager ( cfg , 1 )
am , err := NewAlertmanager ( cfg , 1 , nil )
require . NoError ( t , err )
require . NoError ( t , err )
// We should have no configuration at first.
// We should have no configuration at first.
@ -214,7 +214,7 @@ func TestIntegrationRemoteAlertmanagerSilences(t *testing.T) {
TenantID : tenantID ,
TenantID : tenantID ,
BasicAuthPassword : password ,
BasicAuthPassword : password ,
}
}
am , err := NewAlertmanager ( cfg , 1 )
am , err := NewAlertmanager ( cfg , 1 , nil )
require . NoError ( t , err )
require . NoError ( t , err )
// We should have no silences at first.
// We should have no silences at first.
@ -293,7 +293,7 @@ func TestIntegrationRemoteAlertmanagerAlerts(t *testing.T) {
TenantID : tenantID ,
TenantID : tenantID ,
BasicAuthPassword : password ,
BasicAuthPassword : password ,
}
}
am , err := NewAlertmanager ( cfg , 1 )
am , err := NewAlertmanager ( cfg , 1 , nil )
require . NoError ( t , err )
require . NoError ( t , err )
// Wait until the Alertmanager is ready to send alerts.
// Wait until the Alertmanager is ready to send alerts.
@ -355,7 +355,7 @@ func TestIntegrationRemoteAlertmanagerReceivers(t *testing.T) {
BasicAuthPassword : password ,
BasicAuthPassword : password ,
}
}
am , err := NewAlertmanager ( cfg , 1 )
am , err := NewAlertmanager ( cfg , 1 , nil )
require . NoError ( t , err )
require . NoError ( t , err )
// We should start with the default config.
// We should start with the default config.