Any way to allow a Task or Test to receive traffic from other pods in garden cluster?

We have a docker image that runs API tests against services running in our Garden cluster. A component of these tests includes starting up mock APIs with the Test pod that will be called by the service we are testing so that we can verify that the service is calling its upstream dependencies properly. It seems like this would be possible if the Tests included the ability to define a “ports” collection in the same way that a “service” does.

Is there any workaround currently to allow a Test pod to receive traffic from other pods in the cluster?

If we move to using a “service” instead of a “test”, then we run into other problems - namely, we need to export test artifacts once the test is completed and we’ll also need some way to determine that the tests within the service container have completed running so that we can proceed in tearing down the garden.

Any ideas would be greatly appreciated. Thanks!

Hey @Brett.Davis. That’s an interesting one! There isn’t currently a notion of this on container module tests, but it’s something that we could consider.

I’m trying to think how else you might go about it in the meantime. Let me poke around a bit and I’ll ping back!

Sorry about the late reply @Brett.Davis. I can’t quite come up with a way to achieve this without code changes, but I like the notion. If you drop a feature request on our GitHub we’re happy to dig into it, it’s not that hard to rig up. Basically we’d want to add a Service resource for the test pod during its execution.

Done! https://github.com/garden-io/garden/issues/2423

Thanks for your help Jon!

-Brett