-
Notifications
You must be signed in to change notification settings - Fork 5
Add test for configurable port #17
base: master
Are you sure you want to change the base?
Conversation
I like the proposed change to the test suite, i.e. to test whether hook handlers are accepting host and port options. I have no objections to the names, As you mentioned, we need to find out how other hook libs will behave if they're given We have one existing and passing implementation (in PHP), so I think this is good to be merged to the test suite (reminder: we should document the process of accepting and propagating changes to this test suite at least in the README 🤔 ). Once this is merged, hook handler authors should be notified in their issues that their project is lacking behind the spec. This is non-trivial change, so I'm far from sending ready-to-be-merged Pull Requests everywhere, as I usually strive to do. I'd leave catching up to the hook handler authors. The behavior is currently broken anyway, so if a hook handler won't catch up, it won't break anything more than is already broken. What do you think? @ddelnano @gonzalo-bulnes @w-vi @netmilk |
Maybe a simple check sending an |
@w-vi I like the idea of Dredd be able to discover the feature set of the hooks server at runtime. I am not familiar with Dredd internals enough to understand how easy / hard the change would be to support that but certainly something I would not mind helping out with. @honzajavorek also just want to point out the php hooks are "passing" in the sense that as long as Dredd implements to some extent what I did in this. If people started to implement this test they would need to pull that PR I linked to. |
Yes, that's good to have in mind. We need to think this through before the Dredd PR gets merged, but then the PR needs to be merged before this one 😅 |
@gonzalo-bulnes @w-vi @netmilk @honzajavorek I outlined the impact of existing hooks servers here. |
features/configurable_port.feature
Outdated
Feature: Configurable port | ||
|
||
Background: | ||
Given I have "dredd-hooks-php" command installed |
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.
s/php/{{mylanguage}}/
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.
👍 updated.
This is to address #11.
I already have this working for the php hooks based on a dredd change I made to pass the port to the hooks server command.
Todo
I am assuming my dredd PR will need some work since it was the quickest change just to see this test work locally on my machine. The change I made will cause problems with backwards compatibility (for instance @w-vi mentioned that the python hooks treat all arguments as filenames). So atleast just wanted to get this rolling and hear feedback. Another flag that is not used but can be provided is the
--hooks-worker-handler-host
so maybe we should include that change in this PR as well.