save progress
This commit is contained in:
@@ -24,11 +24,11 @@ public sealed class HealthEndpointsTests : IClassFixture<PlatformWebApplicationF
|
||||
using var client = factory.CreateClient();
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Tenant", tenantId);
|
||||
|
||||
var first = await client.GetFromJsonAsync<PlatformItemResponse<PlatformHealthSummary>>("/api/v1/platform/health/summary");
|
||||
var first = await client.GetFromJsonAsync<PlatformItemResponse<PlatformHealthSummary>>("/api/v1/platform/health/summary", TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(first);
|
||||
Assert.False(first!.Cached);
|
||||
|
||||
var second = await client.GetFromJsonAsync<PlatformItemResponse<PlatformHealthSummary>>("/api/v1/platform/health/summary");
|
||||
var second = await client.GetFromJsonAsync<PlatformItemResponse<PlatformHealthSummary>>("/api/v1/platform/health/summary", TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(second);
|
||||
Assert.True(second!.Cached);
|
||||
Assert.Equal(first.DataAsOf, second.DataAsOf);
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class MetadataEndpointsTests : IClassFixture<PlatformWebApplicatio
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Tenant", "tenant-metadata");
|
||||
|
||||
var response = await client.GetFromJsonAsync<PlatformItemResponse<PlatformMetadata>>(
|
||||
"/api/v1/platform/metadata");
|
||||
"/api/v1/platform/metadata", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.NotNull(response);
|
||||
var ids = response!.Item.Capabilities.Select(cap => cap.Id).ToArray();
|
||||
|
||||
@@ -23,10 +23,10 @@ public sealed class OnboardingEndpointsTests : IClassFixture<PlatformWebApplicat
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Tenant", "tenant-onboarding");
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Actor", "actor-onboarding");
|
||||
|
||||
var response = await client.PostAsync("/api/v1/platform/onboarding/complete/connect-scanner", null);
|
||||
var response = await client.PostAsync("/api/v1/platform/onboarding/complete/connect-scanner", null, TestContext.Current.CancellationToken);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
var state = await response.Content.ReadFromJsonAsync<PlatformOnboardingState>();
|
||||
var state = await response.Content.ReadFromJsonAsync<PlatformOnboardingState>(TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.NotNull(state);
|
||||
var step = state!.Steps.FirstOrDefault(item => item.Step == "connect-scanner");
|
||||
|
||||
@@ -31,10 +31,10 @@ public sealed class PreferencesEndpointsTests : IClassFixture<PlatformWebApplica
|
||||
["filters"] = new JsonObject { ["scope"] = "tenant" }
|
||||
});
|
||||
|
||||
var updateResponse = await client.PutAsJsonAsync("/api/v1/platform/preferences/dashboard", request);
|
||||
var updateResponse = await client.PutAsJsonAsync("/api/v1/platform/preferences/dashboard", request, TestContext.Current.CancellationToken);
|
||||
updateResponse.EnsureSuccessStatusCode();
|
||||
|
||||
var updated = await client.GetFromJsonAsync<PlatformDashboardPreferences>("/api/v1/platform/preferences/dashboard");
|
||||
var updated = await client.GetFromJsonAsync<PlatformDashboardPreferences>("/api/v1/platform/preferences/dashboard", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.NotNull(updated);
|
||||
Assert.Equal("tenant-preferences", updated!.TenantId);
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class QuotaEndpointsTests : IClassFixture<PlatformWebApplicationFa
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Tenant", "tenant-quotas");
|
||||
|
||||
var response = await client.GetFromJsonAsync<PlatformListResponse<PlatformQuotaUsage>>(
|
||||
"/api/v1/platform/quotas/summary");
|
||||
"/api/v1/platform/quotas/summary", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.NotNull(response);
|
||||
var items = response!.Items.ToArray();
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class SearchEndpointsTests : IClassFixture<PlatformWebApplicationF
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Tenant", "tenant-search");
|
||||
|
||||
var response = await client.GetFromJsonAsync<PlatformListResponse<PlatformSearchItem>>(
|
||||
"/api/v1/platform/search?limit=5");
|
||||
"/api/v1/platform/search?limit=5", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.NotNull(response);
|
||||
var items = response!.Items.Select(item => item.EntityId).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user