In the case that you are working on a server where you do not have privileges to edit the /etc/hosts file, it is useful to be able to use the custom dns resolver option supported by the apache client. It is similar to the --resolve <host:port:address[,address]...> of cUrl. It is also the only way to test virtual hosts like an OpenShift cluster where encrypted traffic is passed through proxy to the intended backend using the TLS SNI extension to determine where to route the request.
To this end I added a config to the client of
:custom-dns-resolver {"foo.bar.com" [127 0 0 1]} which maps foo.bar.com to 127.0.0.1.
I only changed the BasicHttpClientConnectionManager and added an ipv4 test, and ipv6 test and a function ipv6-interfaces to test if IPV6 was available before running the ipv6 test. The function should probably be in the utils file, not the core_test.clj file.
I also added a github action (that's the workflow file) to run the tests :all on checkin. It seems to work just fine, except the null gzip test threw an EOFException. I wrapped it in a try catch block. I do not know why this was not happening previously. It throws the exception locally and in the github action.
Please let me know if this is good enough or if you would need anything else done before accepting my merge request.
In the case that you are working on a server where you do not have privileges to edit the /etc/hosts file, it is useful to be able to use the custom dns resolver option supported by the apache client. It is similar to the --resolve <host:port:address[,address]...> of cUrl. It is also the only way to test virtual hosts like an OpenShift cluster where encrypted traffic is passed through proxy to the intended backend using the TLS SNI extension to determine where to route the request. To this end I added a config to the client of
:custom-dns-resolver {"foo.bar.com" [127 0 0 1]} which maps foo.bar.com to 127.0.0.1.
I only changed the BasicHttpClientConnectionManager and added an ipv4 test, and ipv6 test and a function ipv6-interfaces to test if IPV6 was available before running the ipv6 test. The function should probably be in the utils file, not the core_test.clj file.
I also added a github action (that's the workflow file) to run the tests :all on checkin. It seems to work just fine, except the null gzip test threw an EOFException. I wrapped it in a try catch block. I do not know why this was not happening previously. It throws the exception locally and in the github action.
Please let me know if this is good enough or if you would need anything else done before accepting my merge request.