Closed darkrift closed 1 month ago
Want to see if https://github.com/dzbarsky/rules_itest/commit/edd88931960c1fb346ee5a53df5b0ac1d07df751 works for you?
We actually don't restrict the named ports to just the dependencies - in general, the entire port mapping is global (that's pretty handy for cases when you have optional dependencies, want to arrange services into groups for parallel startup, etc). So this mostly "just worked" when adding the attributes
It does ! Thanks alot 😃
Whenever you have complex initial setup (a service, with tasks to configure said service) hidden behind a macro, the test that refers to those services ends up depending on a service group that is named differently than the named port to connect to.
Example: a kafka broker with multiple
itest_itask
to create the necessary topics.You would define an
itest_service
for the broker namekafka_broker
, theitest_itask
s for the topics and anitest_service_group
to group all of them together.The SUT then depends on the itest_service_group (for instance
kafka_service_group
), but the named port replacement is going to be that of the brokerkafka_broker
An idea could be to allow itest_service_group to define named ports that would only be used by the dependencies to unify the exposed target to depend on and the port names