[MM-61464] Fix errcheck issues in server/channels/app/post_metadata.go (#29204)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Rohan Sharma
2024-11-18 13:05:50 +05:30
коммит произвёл GitHub
родитель d6a89c69c2
Коммит c682f649b5
3 изменённых файлов: 14 добавлений и 9 удалений

Просмотреть файл

@@ -2119,7 +2119,7 @@ func TestGetLinkMetadata(t *testing.T) {
timestamp := int64(1547510400000)
title := "from cache"
cacheLinkMetadata(requestURL, timestamp, &opengraph.OpenGraph{Title: title}, nil, nil)
cacheLinkMetadata(th.Context, requestURL, timestamp, &opengraph.OpenGraph{Title: title}, nil, nil)
t.Run("should use cache if cached entry exists", func(t *testing.T) {
_, _, _, ok := getLinkMetadataFromCache(requestURL, timestamp)
@@ -2484,7 +2484,7 @@ func TestGetLinkMetadata(t *testing.T) {
requestURL := server.URL + "/error?name=" + t.Name()
timestamp := int64(1547510400000)
cacheLinkMetadata(requestURL, timestamp, &opengraph.OpenGraph{Title: "cached"}, nil, nil)
cacheLinkMetadata(th.Context, requestURL, timestamp, &opengraph.OpenGraph{Title: "cached"}, nil, nil)
og, img, _, err := th.App.getLinkMetadata(th.Context, requestURL, timestamp, true, "")
assert.NotNil(t, og)