You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a peculiar use case, where I'm using dockest for the validation of service APIs. In this context, I would like to tap into the container logs and also be able to send signals to the processes (e.g. SIGTERM). I see some alternatives and would like to hear your thoughts.
This onReady would get things like containerId and other things that may be useful and, I guess... set some env vars so that the tests can pick up (onReady should be before runJest happens).
LMK your thoughts.
The text was updated successfully, but these errors were encountered:
I have a peculiar use case, where I'm using dockest for the validation of service APIs. In this context, I would like to tap into the container logs and also be able to send signals to the processes (e.g. SIGTERM). I see some alternatives and would like to hear your thoughts.
This onReady would get things like containerId and other things that may be useful and, I guess... set some env vars so that the tests can pick up (onReady should be before runJest happens).
LMK your thoughts.
Adding life cycle events such as this is definitely possible and shouldn't be all too difficult. If you've got time to start drafting a PR I'd be happy to assist. This is where containerIds are resolved and should serve as a good starting point.
Hm, haven't considered this particular split before. It'd have to be worth the investment compared to e.g. adding additional configuration to achieve similar results.
I have a peculiar use case, where I'm using dockest for the validation of service APIs. In this context, I would like to tap into the container logs and also be able to send signals to the processes (e.g. SIGTERM). I see some alternatives and would like to hear your thoughts.
You already have a
dockerEventStream$
in the runner that I could use. Another one would be to get somehow the container id and rundocker logs
myself. I would probably also need it for sending signals.https://github.com/erikengervall/dockest/blob/master/packages/dockest/src/run/waitForServices/resolveContainerId.ts#L11-L15
I'm not very sure with the solution here, but some sort of lifecycle callback would be handy, like:
This
onReady
would get things like containerId and other things that may be useful and, I guess... set some env vars so that the tests can pick up (onReady should be before runJest happens).LMK your thoughts.
The text was updated successfully, but these errors were encountered: