Open ricardozanini opened 10 months ago
PRs are always welcome! @jmtd - you use Behave tests a lot - any comments on this please?
I wonder if this could be a fix in https://github.com/cekit/behave-test-steps instead. Tests such as check that page is served
could do a port forward in all cases, if it works on all platforms, then there'd be no need for a new cekit flag, or for the user to have any knowledge that the test suite had particular behavioural problems on different platforms.
+1, @jmtd I also think that if we can add port-forward in all cases should be the way to go.
Cool OK.
We (RH OpenJDK container images) don't make use of the check that page is served
step yet; but we do use check that port {port} is open. From what I can tell, this should fail in the same scenarios as the page check. Can you confirm for me please whether that's the case?
@jmtd Sorry for the long winter. Yes, it also fails since the container network is not available locally.
Describe the solution you'd like As youn may know, host networking driver won't work on Windows or Mac:
Hence, behave tests requiring checks like
check that page is served
won't work since the client won't connect to the container.A simple workaround we could implement is adding a
--port-forwarding
to the command line to make Cekit start the container in a random port by default (to avoid clashing when running in parallel).Additional context An implementation idea:
Would forward a local random port to 8080.
Would forward the local 9090 port to 8080.
I can send a PR if you agree to implement this feature.
Cheers!