Azure / Azure/azure-functions-host
FileUtility abstraction
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 483
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
We need to introduce an abstraction to enhance the FileUtility class usage.
The class exposes an Instance property
which I see many tests are overriding when running the tests with a mocked IFileSystem. But since FileUtility.Instance is a shared state, if multiple tests are running parallelly, this would cause one test to get the state set by another test.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/WebJobs.Script/Extensions/FileUtility.cs, especially the Instance property, then inspect the override in test/WebJobs.Script.Tests/Security/SimpleKubernetesClientTests.cs and related mocked IFileSystem usage. The abstraction is done when tests no longer rely on shared FileUtility.Instance state and can run in parallel without crossing state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100