Tests fail on Windows

Open Beginner friendly
#1,411 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp

Research direction

Locate Microsoft.ComponentDetection.Common.Tests and search for DockerServiceTests.DockerService_CanPingDockerAsync and the two SafeFileEnumerableTests methods. Compare their attributes with other tests in the class, then run the affected tests on Windows; done means the intended tests are skipped on Windows and the test suite no longer fails there.

Written by the indexing model from the issue text.

Description

Three tests in Microsoft.ComponentDetection.Common.Tests are failing on Windows 11 using VS2022.

Looks like it should be skipped on Windows, as per other tests in the class

  • DockerServiceTests.DockerService_CanPingDockerAsync

These look like they're intended to be skipped on Windows as thay have a SkipTestOnWindows attribute, but also have a redundant TestMethod attribute.

  • SafeFileEnumerableTests.GetEnumerator_CallsSymlinkCode
  • SafeFileEnumerableTests.GetEnumerator_DuplicatePathIgnored
Dominant language
C#
Stars
553
Forks
135
Avg merge
20h 58m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/component-detection

All issues in microsoft/component-detection

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.