Closed peterbourgon closed 7 years ago
Hi Peter,
I would love to help you with this issue, but I don't really get what I can do. As I've seen there are basic tests in the packages. Is there a specific case, which you are missing? Or should I configure running tests on a specific server?
Thanks in advance
Hi @fvosberg, thanks for reaching out! You're right, the state of the actual project has accelerated away from this issue, at the moment we have good integration tests implemented for all of sd/{etcd,consul,zk} and running on Circle. I'll update the original issue to reflect that.
The only thing left is the tracing stuff, which is tricky! It's slightly less necessary, because OpenTracing itself encapsulates the vast majority of the hard stuff, and it's already well-tested internally. It's also a bit less obvious, because a useful integration test from Go kit's perspective would involve quite a lot of work—though I think it could be quite illuminating!
Off the cuff, here's what I think would need to happen for the integration test, in rough strokes:
The nice thing about this work is that it's nicely self-encapsulated. It's its own little universe of things, probably running in one or more Docker containers, not a lot of touchpoints with the outside world. And I bet it would serve as an excellent example to others!
Is this something you would find interesting, and capable of attempting?
I'm gonna call this resolved. OpenTracing integration tests would be super nice to have, but I think quite difficult to make worth the while.
Go kit includes some packages which are designed to interact with popular open source software. They include
sd/etcd — with CoreOS etcdDONEsd/consul — with HashiCorp ConsulDONEsd/zk — with Apache ZooKeeperDONEMany of those packages include proper integration tests that connect to the relevant software. (Some do not.) In this ticket we should
Writing the tests should involve only basic connectivity and expected functionality. No need to get clever checking for obscure edge conditions, the big win here is making sure we don't regress.
Running the tests should involve absolutely minimal changes to this repo: no complex setup or teardown scripts embedded into circle.yml, please! Leverage Docker images where appropriate, and go with standalone or single-node test-cluster setups wherever possible.