Skip to content

Commit e302c9c

Browse files
authored
Merge pull request #504 from Chris0Jeky/fix/dependabot-compat
Fix breaking API changes for FluentAssertions v8 and EF Core v9 Dependabot upgrades
2 parents 0ae40be + cf69754 commit e302c9c

File tree

7 files changed

+14
-18
lines changed

7 files changed

+14
-18
lines changed

backend/src/Taskdeck.Infrastructure/Repositories/KnowledgeChunkRepository.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public async Task DeleteByDocumentIdAsync(
2525
Guid documentId,
2626
CancellationToken cancellationToken = default)
2727
{
28-
await _dbSet
29-
.Where(c => c.DocumentId == documentId)
30-
.ExecuteDeleteAsync(cancellationToken);
28+
await RelationalQueryableExtensions.ExecuteDeleteAsync(
29+
_dbSet.Where(c => c.DocumentId == documentId),
30+
cancellationToken);
3131
}
3232
}

backend/tests/Taskdeck.Api.Tests/ArchiveApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public async Task GetArchiveItems_WithLimit_ShouldRespectLimit()
9898

9999
var items = await response.Content.ReadFromJsonAsync<List<ArchiveItemDto>>();
100100
items.Should().NotBeNull();
101-
items!.Count.Should().BeLessOrEqualTo(5);
101+
items!.Count.Should().BeLessThanOrEqualTo(5);
102102
}
103103

104104
[Fact]

backend/tests/Taskdeck.Api.Tests/HealthApiTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public async Task Ready_ShouldExcludeCaptureBacklogFromAutomationQueueDepth()
7373
var payload = await response.Content.ReadFromJsonAsync<JsonElement>();
7474
var queue = payload.GetProperty("checks").GetProperty("queue");
7575
queue.GetProperty("depth").GetInt32().Should().Be(0);
76-
queue.GetProperty("captureDepth").GetInt32().Should().BeGreaterOrEqualTo(3);
77-
queue.GetProperty("totalDepth").GetInt32().Should().BeGreaterOrEqualTo(3);
76+
queue.GetProperty("captureDepth").GetInt32().Should().BeGreaterThanOrEqualTo(3);
77+
queue.GetProperty("totalDepth").GetInt32().Should().BeGreaterThanOrEqualTo(3);
7878
}
7979
}

backend/tests/Taskdeck.Api.Tests/LlmQuotaApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public async Task GetKillSwitch_ShouldReturnStatus()
103103
var json = JsonSerializer.Deserialize<JsonElement>(body);
104104
json.TryGetProperty("globalKilled", out _).Should().BeTrue();
105105
json.TryGetProperty("entries", out var entries).Should().BeTrue();
106-
entries.GetArrayLength().Should().BeGreaterOrEqualTo(1);
106+
entries.GetArrayLength().Should().BeGreaterThanOrEqualTo(1);
107107
}
108108

109109
[Fact]

backend/tests/Taskdeck.Api.Tests/LlmQuotaIntegrationTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,9 @@ public async Task UsageSummary_ShouldReflectRecordedUsage()
306306
var usage = await usageResponse.Content.ReadFromJsonAsync<JsonElement>();
307307

308308
usage.GetProperty("totalRequests").GetInt64().Should().Be(messageCount);
309-
usage.GetProperty("totalTokens").GetInt64().Should().BeGreaterOrEqualTo(0);
310-
usage.GetProperty("totalInputTokens").GetInt64().Should().BeGreaterOrEqualTo(0);
311-
usage.GetProperty("totalOutputTokens").GetInt64().Should().BeGreaterOrEqualTo(0);
309+
usage.GetProperty("totalTokens").GetInt64().Should().BeGreaterThanOrEqualTo(0);
310+
usage.GetProperty("totalInputTokens").GetInt64().Should().BeGreaterThanOrEqualTo(0);
311+
usage.GetProperty("totalOutputTokens").GetInt64().Should().BeGreaterThanOrEqualTo(0);
312312

313313
// Verify window boundaries are present
314314
usage.TryGetProperty("windowStart", out _).Should().BeTrue();
@@ -342,7 +342,7 @@ public async Task QuotaStatus_ShouldReturnCorrectRemainingCounts()
342342
afterResponse.StatusCode.Should().Be(HttpStatusCode.OK);
343343
var after = await afterResponse.Content.ReadFromJsonAsync<JsonElement>();
344344
after.GetProperty("requestsThisHour").GetInt64().Should().Be(1);
345-
after.GetProperty("tokensUsedToday").GetInt64().Should().BeGreaterOrEqualTo(0);
345+
after.GetProperty("tokensUsedToday").GetInt64().Should().BeGreaterThanOrEqualTo(0);
346346
}
347347
}
348348

backend/tests/Taskdeck.Api.Tests/OpsCliApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public async Task RunCommand_ShouldFallbackCorrelationId_WhenRequestCorrelationH
134134
var payload = await response.Content.ReadFromJsonAsync<CommandRunDto>();
135135
payload.Should().NotBeNull();
136136
payload!.CorrelationId.Should().NotBe(invalidCorrelationId);
137-
payload.CorrelationId.Length.Should().BeLessOrEqualTo(100);
137+
payload.CorrelationId.Length.Should().BeLessThanOrEqualTo(100);
138138

139139
response.Headers.TryGetValues("X-Request-Id", out var responseRequestIds).Should().BeTrue();
140140
responseRequestIds!.Single().Should().Be(payload.CorrelationId);

backend/tests/Taskdeck.Api.Tests/Support/ApiTestHarness.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,8 @@ public static async Task AssertErrorContractAsync(
102102
}
103103
catch (JsonException ex)
104104
{
105-
Execute.Assertion.FailWith(
106-
"Expected a JSON error contract body for {0}, but parsing failed: {1}. Body: {2}",
107-
expectedStatus,
108-
ex.Message,
109-
rawBody);
110-
return;
105+
throw new XunitException(
106+
$"Expected a JSON error contract body for {expectedStatus}, but parsing failed: {ex.Message}. Body: {rawBody}");
111107
}
112108

113109
payload.ValueKind.Should().Be(JsonValueKind.Object);

0 commit comments

Comments
 (0)