-
-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add support for working with UnixFileMode
#826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for working with UnixFileMode in the Testably.Abstractions testing framework. The implementation provides Unix file permission simulation capabilities for the mock file system, enabling developers to test Unix-specific file permission behaviors in their code.
Key Changes
- Added
IUnixFileModeStrategyinterface and implementations for simulating Unix file permissions - Enhanced storage layer to enforce Unix file mode access controls
- Added comprehensive test coverage for Unix file mode behaviors across File, Directory, and DirectoryInfo operations
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
Tests/Testably.Abstractions.Tests/FileSystem/File/UnixFileModeTests.cs |
Added tests for file operations with Unix file mode restrictions |
Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/UnixFileModeTests.cs |
New test file for DirectoryInfo Unix file mode behaviors |
Tests/Testably.Abstractions.Tests/FileSystem/Directory/UnixFileModeTests.cs |
New test file for Directory Unix file mode behaviors |
Tests/Testably.Abstractions.Testing.Tests/MockFileSystemTests.cs |
Added tests for Unix file mode strategy configuration and platform restrictions |
Tests/Api/Testably.Abstractions.Api.Tests/Expected/*.txt |
Updated API surface definitions to include new Unix file mode interfaces and classes |
Source/Testably.Abstractions.Testing/Storage/InMemoryStorage.cs |
Enhanced storage enumeration and access control with Unix file mode support |
Source/Testably.Abstractions.Testing/Storage/InMemoryContainer.cs |
Added Unix file mode property and access validation to storage containers |
Source/Testably.Abstractions.Testing/Storage/IStorage.cs |
Updated interface to support parent access requests for Unix permission checks |
Source/Testably.Abstractions.Testing/MockFileSystem.cs |
Added Unix file mode strategy configuration and platform validation |
Source/Testably.Abstractions.Testing/Initializer/DirectoryCleaner.cs |
Enhanced directory cleanup to handle Unix file permissions |
Source/Testably.Abstractions.Testing/Helpers/ExceptionFactory.cs |
Added Unix file mode specific exception factory method |
Source/Testably.Abstractions.Testing/FileSystem/NullUnixFileModeStrategy.cs |
New null object implementation for Unix file mode strategy |
Source/Testably.Abstractions.Testing/FileSystem/IUnixFileModeStrategy.cs |
New interface defining Unix file mode simulation strategy |
Source/Testably.Abstractions.Testing/FileSystem/DirectoryMock.cs |
Enhanced directory operations to handle Unix file mode exceptions |
Source/Testably.Abstractions.Testing/FileSystem/DirectoryInfoMock.cs |
Enhanced DirectoryInfo operations to handle Unix file mode exceptions |
Tests/Testably.Abstractions.Tests/FileSystem/File/UnixFileModeTests.cs
Outdated
Show resolved
Hide resolved
Tests/Testably.Abstractions.Tests/FileSystem/File/UnixFileModeTests.cs
Outdated
Show resolved
Hide resolved
Source/Testably.Abstractions.Testing/Storage/InMemoryStorage.cs
Outdated
Show resolved
Hide resolved
Source/Testably.Abstractions.Testing/FileSystem/NullUnixFileModeStrategy.cs
Outdated
Show resolved
Hide resolved
|
|
This is addressed in release v4.3.0. |



This PR adds comprehensive support for working with
UnixFileModein the Testably.Abstractions testing framework. The implementation provides Unix file permission simulation capabilities for the mock file system, enabling developers to test Unix-specific file permission behaviors in their code.Key Changes
IUnixFileModeStrategyinterface and implementations for simulating Unix file permissions