IntegrationMocks.Cleaner
0.0.2-main
See the version list below for details.
dotnet tool install --global IntegrationMocks.Cleaner --version 0.0.2-main
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local IntegrationMocks.Cleaner --version 0.0.2-main
#tool dotnet:?package=IntegrationMocks.Cleaner&version=0.0.2-main&prerelease
nuke :add-package IntegrationMocks.Cleaner --version 0.0.2-main
IntegrationMocks.Cleaner
Brief
This tool may be used to clean up resources that were not released because of process termination.
TCP/IP ports
PortManager
locks host TCP/IP ports in order to start web servers or expose docker containers. Since tests may run in parallel processes it requires some synchronization. The default implementation (PortManager.Default
) creates a file for every locked port in directory Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), $"{nameof(IntegrationMocks)}_{nameof(PortManager)}")
. The file will be deleted once the IPort
instance is disposed or finalized. But in case of process termination the file may stay. So the IntegrationMocks.Cleaner just deletes all the files in the directory.
Docker containers
DefaultContainerNameRepositoryDirectoryPath
creates docker containers using Ductus.FluentDocker
library. The default implementation (DefaultContainerNameRepositoryDirectoryPath.Default
) also creates a file for every started container (the file name equals to the container name) in directory Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), $"{nameof(IntegrationMocks)}_{nameof(FluentDockerContainerManager)}")
. The container and the file will be deleted once the IDockerContainer
is disposed or finalized. But in case of process termination the container or the file may stay. So the IntegrationMocks.Cleaner lists all the files in the directory and deletes them together with the containers.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
2.0.1 | 77 | 6/2/2024 |
2.0.0 | 76 | 5/31/2024 |
1.2.2 | 84 | 5/31/2024 |
1.2.1 | 77 | 5/30/2024 |
1.2.0 | 77 | 5/30/2024 |
1.1.1 | 85 | 5/9/2024 |
1.0.0 | 172 | 4/15/2024 |
0.1.0 | 189 | 5/1/2023 |
0.0.2-main | 192 | 4/30/2023 |
0.0.1-main | 185 | 4/30/2023 |
0.0.0-main | 174 | 4/30/2023 |