Fix xunnit test for PS#4780
Conversation
d0b8a16 to
db12347
Compare
build.psm1
Outdated
There was a problem hiding this comment.
This should probably stay before any calls made to dotnet.
JamesWTruher
left a comment
There was a problem hiding this comment.
a couple of the tests aren't testing the thing they purport to test, so they should be fixed or removed.
test/csharp/test_ExtensionMethods.cs
Outdated
There was a problem hiding this comment.
This doesn't seem to be checking the method on the PSTypeExtensions object. Shouldn't this be something like:
Assert.False(PSTypeExtensions.IsNumeric("string".GetType())
It should actually test the PSTypeExtensions object or just removed
test/csharp/test_Binders.cs
Outdated
test/csharp/test_CorePsPlatform.cs
Outdated
There was a problem hiding this comment.
this isn't very useful and no longer tests what it is reported to test. This needs to check to see that the username returned by whoami is the same as Platform.Unix.UserName. Also, this is a non-windows only test. Is there a way to notate that?
db12347 to
08d5cde
Compare
|
@JamesWTruher Can you update your review? |
build.psm1
Outdated
There was a problem hiding this comment.
How is a failure in xUnit propagated to a failure in AppVeyor / Travis?
JamesWTruher
left a comment
There was a problem hiding this comment.
if everything actually runs on MacOS/Linux ok then I feel it would be better to get it in sooner rather than later. However, Aditya's question needs to be answered, how do we incorporate these results into our pester results?
test/csharp/test_CorePsPlatform.cs
Outdated
There was a problem hiding this comment.
i believe that this is still not good for MacOS. hostname --fqdn is an error. Will this run on Mac?
08d5cde to
fac8815
Compare
|
@chunqingchen This needs to be open. I am working on it. |
cd552f4 to
91b85a8
Compare
bb3966b to
d449465
Compare
|
@JamesWTruher @daxian-dbw I have updated the PR with multiple changes list in the PR description. All tests pass in CI and the log file is uploaded to artifacts on AppVeyor. Please have look. |
build.psm1
Outdated
There was a problem hiding this comment.
this should probably be throw or something - if $results has a problem then it might look like everything passed since the error will likely be hidden in the log
There was a problem hiding this comment.
added throw instead of Write-Error
build.psm1
Outdated
There was a problem hiding this comment.
can this be simplified to just:
if ( -not (test-path (get-psoutput)))
There was a problem hiding this comment.
We use $Content later. So I will keep it as is.
test/csharp/test_MshSnapinInfo.cs
Outdated
There was a problem hiding this comment.
does this need a Skip.IfNot(Platform.IsWindows)?
build.psm1
Outdated
There was a problem hiding this comment.
maybe the single quote is not needed ...
build.psm1
Outdated
There was a problem hiding this comment.
maybe move this line closer to its uses.
test/csharp/csharp.tests.csproj
Outdated
There was a problem hiding this comment.
Maybe not needed as it's already included in Tests.Common.props.
test/csharp/csharp.tests.csproj
Outdated
test/csharp/csharp.tests.csproj
Outdated
tools/appveyor.psm1
Outdated
There was a problem hiding this comment.
it will write a true or false in console, should be suppressed.
tools/travis.ps1
Outdated
There was a problem hiding this comment.
nit: the ending quote is not needed.
|
@daxian-dbw All comments have been addressed and all tests have passed. |
|
@daxian-dbw is this ready to merge? |
faa4ee7 to
d7b7433
Compare
* Initial work to enable xunit * Moved AssemblyOriginatorKeyFile to csharp.tests.csproj * Native binary has dylib extension on macOS
* Initial work to enable xunit * Moved AssemblyOriginatorKeyFile to csharp.tests.csproj * Native binary has dylib extension on macOS
Fixes #852 #851
This is to enable xunit test on all platforms.
This fix includes following change:
dotnet xunit