-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Replace httpbin.org/delay Tests with WebListener #4905
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
* Add TestValue Parameer to accomodate tests which take a value such as Redirect, Encoding and Delay * Adjust existing tests to use TestValue parameter
|
@markekraus, |
adityapatwardhan
left a comment
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.
LGTM
| Returns the same results as the Get test. If a number is supplied, the server will wait that many seconds before returning a response. This can be used to test timeouts. | ||
|
|
||
| ```powershell | ||
| Invoke-WebRequest -Uri 'http://localhost:8083/Delay/5' |
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.
Most of the tests are using the Get-WebListenerUrl function. Suggest adding an example for that as well.
$uri = Get-WebListenerUrl -Test 'Delay' -TestValue '5' #Closed
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 add those on the next iteration. Created #4918 to track. (pull was merged before i could update). #Closed
Unfortunately, there were some odd things coupled with this change that were all somewhat interdependent.
Delaytest to WebListener-TestValueparameter toGet-WebListenerUrlto support tests which take a value such as encoding, redirect, and delay-TestValueI discovered in switching this that the URL's that were being used (e.g.
http://httpbin.org/delay/:5) were actually pointing to a page that immediately returned a505error. The pages were not actually delayed and the web cmdlets were not actually timing out. The tests were passing, but they were checking for the wrong Error ID. I had to correct the error ID in all the tests.Ironically, httpbin.org is having a ton of issues right now. I will push a feature tag later after they have stabilized.Feature tag pushed.reference #2504