mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-04-07 06:57:38 +03:00
Rename cache to messageCache
This commit is contained in:
parent
e79dbf4d00
commit
4cd30c35ce
4 changed files with 50 additions and 49 deletions
|
@ -863,7 +863,7 @@ func TestServer_PublishAttachment(t *testing.T) {
|
|||
require.Equal(t, content, response.Body.String())
|
||||
|
||||
// Slightly unrelated cross-test: make sure we add an owner for internal attachments
|
||||
size, err := s.cache.AttachmentsSize("9.9.9.9") // See request()
|
||||
size, err := s.messageCache.AttachmentsSize("9.9.9.9") // See request()
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, int64(5000), size)
|
||||
}
|
||||
|
@ -892,7 +892,7 @@ func TestServer_PublishAttachmentShortWithFilename(t *testing.T) {
|
|||
require.Equal(t, content, response.Body.String())
|
||||
|
||||
// Slightly unrelated cross-test: make sure we add an owner for internal attachments
|
||||
size, err := s.cache.AttachmentsSize("1.2.3.4")
|
||||
size, err := s.messageCache.AttachmentsSize("1.2.3.4")
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, int64(21), size)
|
||||
}
|
||||
|
@ -912,7 +912,7 @@ func TestServer_PublishAttachmentExternalWithoutFilename(t *testing.T) {
|
|||
require.Equal(t, "", msg.Attachment.Owner)
|
||||
|
||||
// Slightly unrelated cross-test: make sure we don't add an owner for external attachments
|
||||
size, err := s.cache.AttachmentsSize("127.0.0.1")
|
||||
size, err := s.messageCache.AttachmentsSize("127.0.0.1")
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, int64(0), size)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue