-
Notifications
You must be signed in to change notification settings - Fork 323
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
Suggest publish for running on an isolated machine #1726
Conversation
… user in case test host file is not found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with suggestions
} | ||
|
||
/// <summary> | ||
/// Looks up a localized string similar to Unable to find test host at {0}. Please publish your test project and retry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: comment should match with resource string
public void GetTestHostProcessStartIfDepsFileAndTestHostNotFoundShouldThrowException() | ||
{ | ||
this.mockFileHelper.Setup(fh => fh.Exists("test.deps.json")).Returns(false); | ||
this.mockFileHelper.Setup(ph => ph.Exists("testhost.dll")).Returns(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UT for testhost dll true and deps false case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// Try resolving testhost from output directory of test project. This is required if user has published the test project | ||
// and is running tests in an isolated machine. A second scenario is self test: test platform unit tests take a project | ||
// dependency on testhost (instead of nuget dependency), this drops testhost to output path. | ||
testHostPath = Path.Combine(sourceDirectory, "testhost.dll"); | ||
EqtTrace.Verbose("DotnetTestHostManager: Assume published test project, with test host path = {0}.", testHostPath); | ||
|
||
if (!this.fileHelper.Exists(testHostPath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like we could simply replace the message above at line 216 with this new resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are caching the error above, and then throwing that.
This reverts commit c7472a4.
Description
For test projects targetting net core, give actionable message to the user in case test host file is not found.
Related issue
#1585