refactor functional tests for IPv6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Triaged
|
Low
|
Unassigned |
Bug Description
A recent change to correct an IPv6 problem [0] monkeypatches FunctionalTest. An alternative would be to do what Stuart suggested on that patch [1], namely:
If we wanted to get fancy/avoid this monkey patching, we could potentially define an IPV6FunctionalTest which would be a subclass of FunctionalTest. We could define a get_unused_port method which could be ipv6 in the case of IPV6FunctionalTest and ipv4 in the regular FunctionalTest.
Another alternative was suggested by Tomislav on that same patch:
It also crossed my mind that I can introduce a new optional parameter in functions get_unused_port and get_unused_
(Tomislav was worried that creating a subclass would involve duplicating some methods, which would mean more code to maintain.)
It would be good to look into this and decide which way of refactoring is best, and put it on the agenda for the glance weekly meeting to get some feedback before/during coding.
[0] https:/
[1] https:/