-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Move WebCmdlets HTTPS tests to WebListener #4733
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 &ldq 8000 uo;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
Conversation
@markekraus, |
a98f667
to
00cae5b
Compare
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space between Status and pipe
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.
closed
Select-Object -ExpandProperty Content | | ||
ConvertFrom-Json | ||
|
||
$result.Status | Should Be 'OK' |
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.
extra space between Status and pipe
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.
closed
$uri = Get-WebListenerUrl -Https -Test 'Cert' | ||
$result = Invoke-RestMethod -Uri $uri -SkipCertificateCheck | ||
|
||
$result.Status | Should Be 'FAILED' |
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.
extra space between Status and pipe
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.
closed
$certificate = Get-WebListenerClientCertificate | ||
$result = Invoke-RestMethod -uri $uri -Certificate $certificate -SkipCertificateCheck | ||
|
||
$result.Status | Should Be 'OK' |
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.
extra space between Status and pipe
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.
closed
AppVeyor failure is due to #4720 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will switch them to pending. I was asked to "skip" them but perhaps they didn't mean literally to use -skip
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.
Ah, my bad.
|
||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.