Move WebCmdlets HTTPS tests to WebListener#4733
Conversation
|
@markekraus, |
a98f667 to
00cae5b
Compare
SteveL-MSFT
left a comment
There was a problem hiding this comment.
The purely porting of the code looks fine. Some extra whitespace that came from the original test code.
| Select-Object -ExpandProperty Content | | ||
| ConvertFrom-Json | ||
|
|
||
| $result.Status | Should Be 'FAILED' |
There was a problem hiding this comment.
extra space between Status and pipe
| Select-Object -ExpandProperty Content | | ||
| ConvertFrom-Json | ||
|
|
||
| $result.Status | Should Be 'OK' |
There was a problem hiding this comment.
extra space between Status and pipe
| $uri = Get-WebListenerUrl -Https -Test 'Cert' | ||
| $result = Invoke-RestMethod -Uri $uri -SkipCertificateCheck | ||
|
|
||
| $result.Status | Should Be 'FAILED' |
There was a problem hiding this comment.
extra space between Status and pipe
| $certificate = Get-WebListenerClientCertificate | ||
| $result = Invoke-RestMethod -uri $uri -Certificate $certificate -SkipCertificateCheck | ||
|
|
||
| $result.Status | Should Be 'OK' |
There was a problem hiding this comment.
extra space between Status and pipe
|
AppVeyor failure is due to #4720 |
JamesWTruher
left a comment
There was a problem hiding this comment.
thanks for this - it's great that we can move these from using off box connections! I have only one non-blocking question below
|
|
||
| # Test skipped on macOS pending support for Client Certificate Authentication | ||
| # https://github.com/PowerShell/PowerShell/issues/4650 | ||
| It "Verifies Invoke-WebRequest Certificate Authentication Successful with -Certificate" -skip:$IsOSX { |
There was a problem hiding this comment.
if this is eventually going to be run on mac, could you make this -pending:$IsOSX? we track pending tests more closely than skipped tests.
There was a problem hiding this comment.
I will switch them to pending. I was asked to "skip" them but perhaps they didn't mean literally to use -skip
|
|
||
| # Test skipped on macOS pending support for Client Certificate Authentication | ||
| # https://github.com/PowerShell/PowerShell/issues/4650 | ||
| It "Verifies Invoke-RestMethod Certificate Authentication Successful with -Certificate" -skip:$IsOSX { |
There was a problem hiding this comment.
same as above - not sure whether this should be -pending rather than -skip
-skip -> -pending
|
@markekraus Many thanks! I was happy with WebListener, now I am twice happy 😄 |
Resolves #4719
Made separate commits to make it a bit easier to see the changes.