feat: add test database setup and usage helpers

- Introduced a new test file for setting up an in-memory SQLite database for testing purposes.
- Added helper functions for seeding test data, including users, plans, subscriptions, and wallet transactions.
- Implemented usage helpers to load user video counts and storage usage.
- Created user payload struct and functions to build user payloads with preferences and wallet balance.
- Refactored gRPC server setup to include new services and handlers.
- Updated proto files to simplify service definitions by removing redundant service prefixes.
This commit is contained in:
2026-03-25 18:36:03 +07:00
parent a689f8b9da
commit dfd999e058
65 changed files with 6657 additions and 4464 deletions

View File

@@ -8,7 +8,7 @@ import (
grpcpkg "google.golang.org/grpc"
"gorm.io/gorm"
"stream.api/internal/config"
apprpc "stream.api/internal/rpc/app"
apprpc "stream.api/internal/service"
"stream.api/internal/video"
redisadapter "stream.api/internal/video/runtime/adapters/queue/redis"
runtimegrpc "stream.api/internal/video/runtime/grpc"