Alerting: Update alerting module to 2484dbaf55cfe9236e296e113ddbc35136f2feb3 (#105350)

* [create-pull-request] automated change

* populate Image ID

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>

---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: yuri-tceretian <25988953+yuri-tceretian@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
alerting-team[bot]
2025-05-16 23:39:32 +03:00
committed by GitHub
co-authored by yuri-tceretian Yuri Tseretyan
parent 4eadb0fec8
commit 44c3c5a29d
4 changed files with 6 additions and 4 deletions
+1
View File
@@ -38,6 +38,7 @@ func (t tokenStore) GetImage(ctx context.Context, token string) (*alertingImages
}
return &alertingImages.Image{
ID: token,
URL: image.URL,
RawData: func(_ context.Context) (alertingImages.ImageContent, error) {
if image.Path == "" {
+2 -1
View File
@@ -118,6 +118,7 @@ func TestGetImage(t *testing.T) {
require.Nil(tt, image)
return
}
require.Equal(tt, test.token, image.ID)
require.Equal(tt, test.expImage.URL, image.URL)
if test.expImageContent != nil {
ic, err := image.RawData(context.Background())
@@ -134,7 +135,7 @@ func TestGetImage(t *testing.T) {
func generateTestFile(t *testing.T, b []byte) string {
t.Helper()
f, err := os.CreateTemp("/tmp", "image")
f, err := os.CreateTemp("", "image")
require.NoError(t, err)
defer func(f *os.File) {
_ = f.Close()