Correct validation path, and increase timeout waiting for servers to come online #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
This PR addresses two existing issues:
#140 Exercises use inconsistent wait times when waiting for servers to come online
Problem
(see issue for more complete context) Sometimes one or both of the servers has not come online when the test attempts to execute.
Solution
Make the timeout for all exercises 2000ms. (commit a6845fa)
#130 the "validation" exercise tests the wrong path
Problem
(see issue for more complete context) The validation exercise asks the user to create and endpoint at
/chickens/{breed}
, but the exercise tests for an endpoint at/
.Solution
Change the URL used by the validation exercise.js file to include the
/chickens
path. (commit 11cdb01)Testing
#140
I was unable to reproduce #140 when using a local installation of makemehapi however, I was able to constently reproduce the issue with a global installation using the following steps:
npm install -g makemehapi
makemehapi
and select the directories excercisemakemehapi verify /usr/local/lib/node_modules/makemehapi/exercises/directories/solution/solution.js
When using the makemehapi master branch, I consistently get something like the following output:
When using my fork/branch, the verification runs successfully.
#130
In order to reproduce this issue, it is necessary to use a hapi server with an endpoint for
/
as well as for/chickens
. Here's a script to use:Inside a local copy of makemehapi/master, save this script as
makemehapi_validation_solution.js
, then verify it with:node makemehapi
, and select the validation exercisenode makemehapi.js verify makemehapi_validation_solution.js
Expected output:
Next, checkout this fork/branch and rerun the same commands. It should now pass.