Refactor webpush store tests and add coverage

- Add SetSubscriptionUpdatedAt to Store interface, remove DB() accessor
- Rename store files to store_sqlite.go and store_postgres.go
- Use camelCase for test function names
- Add tests for upsert field updates and multi-user removal
- Use transaction in setupNewPostgresDB
- Use lowercase "excluded." in PostgreSQL upsert query
This commit is contained in:
binwiederhier
2026-02-16 18:53:12 -05:00
parent 5331437664
commit a8dcecdb6d
9 changed files with 220 additions and 155 deletions

View File

@@ -29,6 +29,7 @@ type Store interface {
RemoveSubscriptionsByEndpoint(endpoint string) error
RemoveSubscriptionsByUserID(userID string) error
RemoveExpiredSubscriptions(expireAfter time.Duration) error
SetSubscriptionUpdatedAt(endpoint string, updatedAt int64) error
Close() error
}