-
Notifications
You must be signed in to change notification settings - Fork 8.1k
[Feature] Add Tests for Web Cmdlet Certificate Authentication #4620
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
Conversation
|
@markekraus, |
5cd8636 to
22fbec1
Compare
| $result = Invoke-RestMethod -uri $uri -Certificate $Certificate -SkipCertificateCheck | ||
| $result | Should Match ([regex]::Escape($successMessage)) | ||
| } | ||
| } |
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.
Please add new line at EOF.
| Push-Location $containerPath | ||
| $null = docker build -t $containerName . | ||
| $timeOut = (get-date).AddSeconds($initTimeoutSeconds) | ||
| $null = docker run -d -p ${portNumber}:${portNumber} --name $containerName $containerName $portNumber |
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.
Can we compile the container at CI startup like our TestExe and run? If it is possible we could remove "Slow" and "Feature".
Also maybe move the project to Tools folder.
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 we compile the container at CI start, that couples the test with an entire build scenario instead of a test scenario.
| @@ -0,0 +1 @@ | |||
| @RenderBody() No newline at end of file | |||
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.
Please check all files and add new line at EOF - some files have it and some files haven't it - we should use one pattern for all files.
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.
@iSazonov _Layout.cshtml and index.cshtml intentional as those determine the response stream and superfluous new lines cause it to respond less like a raw reply and more like an HTML page. I will correct the others.
|
I think different approach will be needed. After looking at the Travis CI failures and reading the documentation, Docker is not supported on OS X. I'm going to close this pull request and think of a new plan of attack. |
|
Thank you so much for your efforts! Perhaps we should still use servers that are supported by CIs internally. |
|
@iSazonov I'm considering using the aspnetcore project without docker as the baked in Kestrel server is available cross-platform. Making the tests CI specific couples them with the CI and then breaks when the CI environment changes. The only problem with the aspnetcore approach is that the test will now be coupled with the dotnet SDK, probably not a huge deal as moving to the next major version would entail other code and testing reworks. I welcome your input on it in #4609. |
Addresss #4609 and corrects
Pendingtests from #4546This test uses an ASP.NET Core 2.0 app in a docker container to run a simple service to echo back the client certificate details if one was provided. If a client cert is not provided, the details are empty and the status reports
FAILED. Since this test will be slow in the CI's I have use a separateDescribeblock and included theFeatureandSlowtags.