feat: add resource quotas, PayPal subscriptions and paid disk allowances
Calculate and enforce configurable resource consumption, expose balances in PostIt and document the rule in CGU. Add confirmed monthly PayPal credits and disk quotas of twice the free default for Discovery and five times for Premium, with payment reconciliation, migrations and regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
0728d2a3f7
commit
650e5f5e30
69 changed files with 19111 additions and 203 deletions
|
|
@ -10,6 +10,7 @@ using Yavsc.Models.Blog;
|
|||
using Yavsc.Models.Relationship;
|
||||
using Yavsc.Services;
|
||||
using Yavsc.Tests.Shared;
|
||||
using Yavsc.Server.Helpers;
|
||||
using static Yavsc.Constants;
|
||||
namespace Yavsc.Blogs.Tests;
|
||||
|
||||
|
|
@ -85,6 +86,7 @@ public sealed class BlogsWebServerFixture : WebHostFixture
|
|||
|
||||
protected override WebApplication BuildApp(WebApplicationBuilder builder)
|
||||
{
|
||||
builder.Services.AddResourceUsage(builder.Configuration);
|
||||
// Open the shared in-memory connection lazily on the first
|
||||
// fixture construction. Subsequent constructions (xUnit
|
||||
// creates one fixture instance per IClassFixture) reuse
|
||||
|
|
@ -132,6 +134,7 @@ public sealed class BlogsWebServerFixture : WebHostFixture
|
|||
builder.Services.Configure<SiteSettings>(s =>
|
||||
{
|
||||
s.UserFilesRoot = BlogFilesRoot;
|
||||
s.Authority = "https://example.test";
|
||||
});
|
||||
|
||||
// Real BlogSpotService — same instance the production host
|
||||
|
|
|
|||
Loading…
Reference in a new issue