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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user