Skip to content

fix: fixed mock file system exception when using root path as a parameter - #1132

Merged
vbreuss merged 9 commits into
TestableIO:mainfrom
vladimir-shirmanov:bugfix/support-different-roots
Jul 13, 2024
Merged

fix: fixed mock file system exception when using root path as a parameter#1132
vbreuss merged 9 commits into
TestableIO:mainfrom
vladimir-shirmanov:bugfix/support-different-roots

Conversation

@vladimir-shirmanov

@vladimir-shirmanovvladimir-shirmanov commented Jul 12, 2024

Copy link
Copy Markdown
Contributor

fix: MockFileSystem does not support Root directories

Description

Added a check inside AddFile to be able to add new Drives within a constructor

Fixed#702

@vbreussvbreuss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request, I only have some minor suggestions.

Please also adapt the title to conform to the conventional commits guideline.

@vladimir-shirmanov

Copy link
Copy Markdown
ContributorAuthor

Thanks for the pull request, I only have some minor suggestions.

Please also adapt the title to conform to the conventional commits guideline.

oh sure, I'll add those in future commits.
Haven't seen that instruction in CONTRIBUTION.md, sorry for that.

Comment threadsrc/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileSystem.cs Outdated
Comment threadCONTRIBUTING.md Outdated
@vladimir-shirmanovvladimir-shirmanov changed the title fixed mock file system exception when using root path as a parameterfix: changed mock file system exception when using root path as a parameterJul 13, 2024
@vladimir-shirmanovvladimir-shirmanov changed the title fix: changed mock file system exception when using root path as a parameterfix: fixed mock file system exception when using root path as a parameterJul 13, 2024

@vbreussvbreuss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for your effort, @vladimir-shirmanov 👍

@vbreussvbreuss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just saw, that the tests failed for Ubuntu and MacOS. Probably the path separator must be OS dependent, @vladimir-shirmanov

@vladimir-shirmanov

Copy link
Copy Markdown
ContributorAuthor

Sorry, I just saw, that the tests failed for Ubuntu and MacOS. Probably the path separator must be OS dependent, @vladimir-shirmanov

I see that some tests are marked as Windows only, how do you think is it a good candidate for that as well?
Cause drives are Windows-only construct, so it is safe to mark those 2 specific tests as Windows only.

@vbreuss
vbreuss merged commit f2bcaa9 into TestableIO:mainJul 13, 2024
@github-actions

Copy link
Copy Markdown

This is addressed in release v21.0.26.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: releasedIssues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MockFileSystem does not support Root directories

2 participants

@vladimir-shirmanov@vbreuss