diff --git a/tests/NexusMods.DataModel.SchemaVersions.Tests/LegacyDatabaseSupportTests.cs b/tests/NexusMods.DataModel.SchemaVersions.Tests/LegacyDatabaseSupportTests.cs index bc7c38c19..cd8f36eae 100644 --- a/tests/NexusMods.DataModel.SchemaVersions.Tests/LegacyDatabaseSupportTests.cs +++ b/tests/NexusMods.DataModel.SchemaVersions.Tests/LegacyDatabaseSupportTests.cs @@ -14,7 +14,7 @@ namespace NexusMods.DataModel.SchemaVersions.Tests; -public class LegacyDatabaseSupportTests(IServiceProvider provider, TemporaryFileManager tempManager, IFileExtractor extractor) +public class LegacyDatabaseSupportTests(IServiceProvider provider, IFileExtractor extractor) { private readonly SignatureChecker _zipSignatureChecker = new(FileType.ZIP); @@ -30,14 +30,20 @@ public async Task TestDatabase(string name) var isZip = await _zipSignatureChecker.MatchesAnyAsync(stream); isZip.Should().BeTrue("the database file should be a ZIP archive, you may need to pull the file from LFS (`git lfs pull`)"); } - - await using var workingFolder = tempManager.CreateFolder(); + + var basePath = FileSystem.Shared.GetKnownPath(KnownPath.EntryDirectory).Combine("Temp").Combine($"Test-{Guid.NewGuid()}"); + basePath.CreateDirectory(); + basePath.DirectoryExists().Should().BeTrue(); + + using var temporaryFileManager = new TemporaryFileManager(FileSystem.Shared, basePath: basePath); + + await using var workingFolder = temporaryFileManager.CreateFolder(); await extractor.ExtractAllAsync(path, workingFolder.Path); - + var datamodelFolder = workingFolder.Path.Combine("MnemonicDB.rocksdb"); datamodelFolder.DirectoryExists().Should().BeTrue("the extracted database folder should exist"); datamodelFolder.EnumerateFiles().Should().NotBeEmpty("the extracted database folder should contain files"); - + using var backend = new Backend(); var settings = new DatomStoreSettings {