feat(sync): paginate Android sync with change tokens
Lint / Lint (push) Successful in 1m8s
Tests / Go backend (push) Failing after 1m23s
Tests / Dashboard checks (push) Failing after 38s
Docker / Docker Build & Push (push) Failing after 6m29s

This commit is contained in:
Gabriel20xx committed 2026-10-20 15:27:53 +00:00
1 parent 0ff94f9b10
commit 97c237be80
76 files changed
+3401 -851

No files matched your search

@@ -9,11 +9,28 @@ import (
"testing"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5/pgxpool"
sharedauth "repos.gfranz.ch/Gabriel20xx/shared/backend/auth"
"repos.gfranz.ch/Gabriel20xx/shared/backend/authclient"
)
func TestSettingValueReturnsDatabaseErrors(t *testing.T) {
db, err := pgxpool.New(context.Background(), "postgres://nobody@127.0.0.1:1/none?sslmode=disable&connect_timeout=1")
if err != nil {
t.Fatalf("pgxpool.New: %v", err)
}
defer db.Close()
value, err := SettingValue(context.Background(), db, "example", "fallback")
if err == nil || value != "" {
t.Fatalf("SettingValue() = %q, %v; want empty value and database error", value, err)
}
if got := SettingValueOrFallback(context.Background(), db, "example", "fallback"); got != "fallback" {
t.Fatalf("SettingValueOrFallback() = %q, want fallback on error", got)
}
}
// loginRequiredStore is a ProxyStore that always requires login, so the auth gate can be
// exercised without a database.
type loginRequiredStore struct{}