null paiment id
Some checks failed
Dotnet build and test / log-the-inputs (push) Failing after 4s
Dotnet build and test / build (push) Failing after 1s

This commit is contained in:
Paul Schneider
2025-07-15 15:42:30 +01:00
parent 62e863e343
commit d8b09cb42e
8 changed files with 3710 additions and 41 deletions

View File

@ -40,8 +40,10 @@ namespace yavscTests
[Fact]
public void GitClone()
{
Assert.NotNull (_serverFixture.DbContext.Project);
var firstProject = _serverFixture.DbContext.Project.Include(p=>p.Repository).FirstOrDefault();
using var scope = _serverFixture.Services.CreateScope();
var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
Assert.NotNull (dbContext.Project);
var firstProject = dbContext.Project.Include(p=>p.Repository).FirstOrDefault();
Assert.NotNull (firstProject);
var di = new DirectoryInfo(_serverFixture.SiteSettings.GitRepository);
if (!di.Exists) di.Create();

View File

@ -16,6 +16,7 @@ using Yavsc.Services;
using yavscTests.Settings;
using Yavsc.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
namespace isnd.tests
{
@ -32,6 +33,7 @@ namespace isnd.tests
private WebApplication app;
public IServiceProvider Services { get; private set; }
public string TestingUserName { get; private set; }
public string ProtectedTestingApiKey { get; internal set; }
public ApplicationUser TestingUser { get; private set; }
@ -39,7 +41,6 @@ namespace isnd.tests
public SiteSettings SiteSettings { get => siteSettings; set => siteSettings = value; }
public MailSender MailSender { get; internal set; }
public TestingSetup? TestingSetup { get; internal set; }
public ApplicationDbContext DbContext { get; internal set; }
public WebServerFixture()
{
@ -63,6 +64,7 @@ namespace isnd.tests
.Build();
this.app = builder.ConfigureWebAppServices();
Services = app.Services;
using (var migrationScope = app.Services.CreateScope())
{
var db = migrationScope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
@ -114,7 +116,9 @@ namespace isnd.tests
TestingUser = new ApplicationUser
{
UserName = testingUserName
UserName = testingUserName,
Email = testingUserName + "@example.com",
EmailConfirmed = true
};
var result = userManager.CreateAsync(TestingUser).Result;