Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/Testing/Fixtures/IntegrationFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ public async Task FinishLexboxProjectResetWithTemplateRepo(string projectCode)
public async Task FinishLexboxProjectResetWithRepo(string projectCode, FileInfo repo)
{
Exception? failureException = null;
// UploadFile.FromFile opens a FileStream nobody disposes; Windows then refuses to delete the zip.
await using var stream = repo.OpenRead();
await AdminApiTester.HttpClient.UploadWithProgressAsync(new Uri($"{AdminApiTester.BaseUrl}/api/project/upload-zip/{projectCode}"),
UploadFile.FromFile(repo, "application/zip"), new UploadOptions
new UploadFile(stream, repo.Name, "application/zip", repo.Length), new UploadOptions
{
Metadata = new Dictionary<string, string> { ["filetype"] = "application/zip" },
ProgressHandler = new DelegatingProgressHandler
Expand Down
Loading