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

Fix working directory while discovering tests #29

Merged
merged 1 commit into from
Jan 4, 2021
Merged

Fix working directory while discovering tests #29

merged 1 commit into from
Jan 4, 2021

Conversation

bianyifan
Copy link
Contributor

Previously the working directory used in DiscoverTests(ITestAttribute, string, Action, Action) is something like SomeProject/bin/Debug/net5.0/SomeProject.dll, so loading test specs from the output directory (such as SomeProject/bin/Debug/net5.0/specs/a.yml) will fail and report a warning like No file is found in directory 'SomeProject/bin/Debug/net5.0/SomeProject.dll' using glob pattern 'specs/*.yml'. In code I found that sourcePath is calculated as the directory containing the test DLL but never used. This simple fix will allow users to load test specs from the output directory, as it should be by design.

Copy link
Collaborator

@yufeih yufeih left a comment

Choose a reason for hiding this comment

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

Thanks for catching the error!

@yufeih yufeih merged commit 426293c into docascode:master Jan 4, 2021
yufeih added a commit that referenced this pull request Jan 4, 2021
* Bump Nerdbank.GitVersioning from 3.2.31 to 3.3.37 (#16)

Bumps [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) from 3.2.31 to 3.3.37.
- [Release notes](https://github.com/dotnet/Nerdbank.GitVersioning/releases)
- [Commits](dotnet/Nerdbank.GitVersioning@v3.2.31...v3.3.37)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.TestPlatform.ObjectModel from 16.7.1 to 16.8.0 (#19)

Bumps [Microsoft.TestPlatform.ObjectModel](https://github.com/microsoft/vstest) from 16.7.1 to 16.8.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](microsoft/vstest@v16.7.1...v16.8.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump HtmlAgilityPack from 1.11.24 to 1.11.27 (#20)

Bumps [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack) from 1.11.24 to 1.11.27.
- [Release notes](https://github.com/zzzprojects/html-agility-pack/releases)
- [Commits](zzzprojects/html-agility-pack@v1.11.24...v1.11.27)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump HtmlAgilityPack from 1.11.27 to 1.11.28 (#22)

Bumps [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack) from 1.11.27 to 1.11.28.
- [Release notes](https://github.com/zzzprojects/html-agility-pack/releases)
- [Commits](zzzprojects/html-agility-pack@v1.11.27...v1.11.28)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.NET.Test.Sdk from 16.7.1 to 16.8.0 (#21)

Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.7.1 to 16.8.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](microsoft/vstest@v16.7.1...v16.8.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump YamlDotNet from 8.1.2 to 9.1.0 (#23)

Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 8.1.2 to 9.1.0.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Changelog](https://github.com/aaubry/YamlDotNet/blob/master/RELEASE_NOTES.md)
- [Commits](aaubry/YamlDotNet@v8.1.2...v9.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* netcoreapp3.0 -> netcoreapp3.1

* Update dotnetcore.yml

* Fix build

* Bump HtmlAgilityPack from 1.11.28 to 1.11.29 (#28)

Bumps [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack) from 1.11.28 to 1.11.29.
- [Release notes](https://github.com/zzzprojects/html-agility-pack/releases)
- [Commits](zzzprojects/html-agility-pack@v1.11.28...v1.11.29)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrade packages

* Update dotnetcore.yml

* Fix working directory while discovering tests (#29)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yifan Bian <bianyifan@users.noreply.github.com>
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