1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-05 20:44:35 +02:00

Finish cache tests

This commit is contained in:
Philipp Heckel 2021-12-08 22:57:31 -05:00
parent b437a87266
commit 98c1ab9e86
8 changed files with 95 additions and 37 deletions

View file

@ -9,10 +9,18 @@ func TestSqliteCache_AddMessage(t *testing.T) {
testCacheMessages(t, newSqliteTestCache(t))
}
func TestSqliteCache_Topics(t *testing.T) {
testCacheTopics(t, newSqliteTestCache(t))
}
func TestSqliteCache_MessagesTagsPrioAndTitle(t *testing.T) {
testCacheMessagesTagsPrioAndTitle(t, newSqliteTestCache(t))
}
func TestSqliteCache_Prune(t *testing.T) {
testCachePrune(t, newSqliteTestCache(t))
}
func newSqliteTestCache(t *testing.T) cache {
filename := filepath.Join(t.TempDir(), "cache.db")
c, err := newSqliteCache(filename)