Frontend gaps fill work. Testing fixes work. Auditing in progress.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Scheduler.Models.Tests;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Scheduler.Models.Tests.Properties;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Scheduler.Models.Tests.Properties;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Scheduler.Models.Tests.Properties;
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="xunit.abstractions" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -24,8 +24,8 @@ public sealed class DistributedLockRepositoryTests : IAsyncLifetime
|
||||
_repository = new DistributedLockRepository(dataSource, NullLogger<DistributedLockRepository>.Instance);
|
||||
}
|
||||
|
||||
public Task InitializeAsync() => _fixture.TruncateAllTablesAsync();
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
public ValueTask InitializeAsync() => new(_fixture.TruncateAllTablesAsync());
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
@@ -189,3 +189,6 @@ public sealed class DistributedLockRepositoryTests : IAsyncLifetime
|
||||
persisted!.HolderId.Should().Be("worker-retry");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ public sealed class GraphJobRepositoryTests : IAsyncLifetime
|
||||
_fixture = fixture;
|
||||
}
|
||||
|
||||
public Task InitializeAsync() => _fixture.TruncateAllTablesAsync();
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
public ValueTask InitializeAsync() => new(_fixture.TruncateAllTablesAsync());
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
private static GraphBuildJob BuildJob(string tenant, string id, GraphJobStatus status = GraphJobStatus.Pending)
|
||||
=> new(
|
||||
@@ -116,3 +116,6 @@ public sealed class GraphJobRepositoryTests : IAsyncLifetime
|
||||
return new SchedulerDataSource(Options.Create(options), NullLogger<SchedulerDataSource>.Instance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed class JobIdempotencyTests : IAsyncLifetime
|
||||
_fixture = fixture;
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
await _fixture.TruncateAllTablesAsync();
|
||||
|
||||
@@ -47,7 +47,7 @@ public sealed class JobIdempotencyTests : IAsyncLifetime
|
||||
_jobRepository = new JobRepository(_dataSource, NullLogger<JobRepository>.Instance);
|
||||
}
|
||||
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
[Fact]
|
||||
public async Task CreateJob_SameIdempotencyKey_SecondInsertFails()
|
||||
@@ -267,3 +267,6 @@ public sealed class JobIdempotencyTests : IAsyncLifetime
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public sealed class SchedulerMigrationTests : IAsyncLifetime
|
||||
{
|
||||
private PostgreSqlContainer _container = null!;
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
_container = new PostgreSqlBuilder()
|
||||
.WithImage("postgres:16-alpine")
|
||||
@@ -40,7 +40,7 @@ public sealed class SchedulerMigrationTests : IAsyncLifetime
|
||||
await _container.StartAsync();
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
await _container.DisposeAsync();
|
||||
}
|
||||
@@ -318,3 +318,6 @@ public sealed class SchedulerMigrationTests : IAsyncLifetime
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -89,14 +89,14 @@ public sealed class SchedulerTestKitPostgresFixture : IAsyncLifetime
|
||||
public TestKitPostgresFixture Fixture => _fixture;
|
||||
public string ConnectionString => _fixture.ConnectionString;
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
_fixture = new TestKitPostgresFixture { IsolationMode = TestKitPostgresIsolationMode.Truncation };
|
||||
await _fixture.InitializeAsync();
|
||||
await _fixture.ApplyMigrationsFromAssemblyAsync(MigrationAssembly, "scheduler");
|
||||
}
|
||||
|
||||
public Task DisposeAsync() => _fixture.DisposeAsync();
|
||||
public ValueTask DisposeAsync() => _fixture.DisposeAsync();
|
||||
|
||||
public async Task TruncateAllTablesAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
@@ -141,3 +141,6 @@ public sealed class SchedulerTestKitPostgresCollection : ICollectionFixture<Sche
|
||||
{
|
||||
public const string Name = "SchedulerTestKitPostgres";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed class SchedulerQueryDeterminismTests : IAsyncLifetime
|
||||
_fixture = fixture;
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
await _fixture.TruncateAllTablesAsync();
|
||||
|
||||
@@ -47,7 +47,7 @@ public sealed class SchedulerQueryDeterminismTests : IAsyncLifetime
|
||||
_jobRepository = new JobRepository(_dataSource, NullLogger<JobRepository>.Instance);
|
||||
}
|
||||
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
[Fact]
|
||||
public async Task GetByStatus_MultipleQueries_ReturnsDeterministicOrder()
|
||||
@@ -333,3 +333,6 @@ public sealed class SchedulerQueryDeterminismTests : IAsyncLifetime
|
||||
return await _jobRepository.CreateAsync(job);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ public sealed class TriggerRepositoryTests : IAsyncLifetime
|
||||
_repository = new TriggerRepository(dataSource, NullLogger<TriggerRepository>.Instance);
|
||||
}
|
||||
|
||||
public Task InitializeAsync() => _fixture.TruncateAllTablesAsync();
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
public ValueTask InitializeAsync() => new(_fixture.TruncateAllTablesAsync());
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
@@ -246,3 +246,6 @@ public sealed class TriggerRepositoryTests : IAsyncLifetime
|
||||
NextFireAt = nextFireAt ?? DateTimeOffset.UtcNow.AddHours(1)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ public sealed class WorkerRepositoryTests : IAsyncLifetime
|
||||
_repository = new WorkerRepository(dataSource, NullLogger<WorkerRepository>.Instance);
|
||||
}
|
||||
|
||||
public Task InitializeAsync() => _fixture.TruncateAllTablesAsync();
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
public ValueTask InitializeAsync() => new(_fixture.TruncateAllTablesAsync());
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
@@ -160,3 +160,6 @@ public sealed class WorkerRepositoryTests : IAsyncLifetime
|
||||
MaxConcurrentJobs = 4
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public sealed class RedisSchedulerQueueTests : IAsyncLifetime
|
||||
_redis = new RedisBuilder().Build();
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -36,7 +36,7 @@ public sealed class RedisSchedulerQueueTests : IAsyncLifetime
|
||||
}
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_skipReason is not null)
|
||||
{
|
||||
@@ -345,3 +345,6 @@ public sealed class RedisSchedulerQueueTests : IAsyncLifetime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ using System.Text.Json;
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Scheduler.WebService.Tests.Contract;
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="xunit.abstractions" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user