Skip to content
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

Include tests for file enumeration in Calamari file system #1170

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

IsaacCalligeros95
Copy link
Contributor

@IsaacCalligeros95 IsaacCalligeros95 commented Oct 25, 2023

Adds tests to the Calamari.Physicalfilesystem file enumeration methods. This was changed back to the original functionality in #1164 and there's no explicit test coverage of this functionality. This PR adds some basic test coverage and makes sure that files returned by multiple search patterns are unique.

Test adapter bump is required for running these locally for net461 - see OctopusDeploy/Halibut#223

[TestCase(@"Config/Feature1/*.config",new[] {"f1-a.config", "f1-b.config", "f1-c.config"}, 3)]
[TestCase(@"Config/Feature2/*.config", new[] {"f2.config", "f2-sub.config"}, 2)]
[TestCase(@"Config/Feature2/Feature2-SubFolder/*.config",new[] {"f2-sub.config"}, 1)]
public void EnumerateFilesRecursively(string pattern, string[] expectedFilesMatchNameWithRecursion, int expectedQty)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could combine this and the above non-recursive search and pass the file enumeration method as a parameter, but I decided to stick with this primarily for separation and clarity. Let me know if you'd rather them combined.

@IsaacCalligeros95 IsaacCalligeros95 requested a review from a team October 25, 2023 03:35
Copy link
Contributor

@hnrkndrssn hnrkndrssn left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@IsaacCalligeros95 IsaacCalligeros95 changed the title Include file enumeration in Calamari Filesystem tests Include tests for file enumeration in Calamari file system Oct 25, 2023
@IsaacCalligeros95 IsaacCalligeros95 enabled auto-merge (squash) October 25, 2023 03:46
@IsaacCalligeros95 IsaacCalligeros95 merged commit 52d1365 into master Oct 26, 2023
23 checks passed
@IsaacCalligeros95 IsaacCalligeros95 deleted the isaac/calamari-fileenumeration-tests branch October 26, 2023 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants