youtube/vitess — pull request #247 by enisoc (2014-12-16 18:53:46+00:00)
Title: Add unit tests for etcdtopo.

@alainjobart

We only actually use a handful of methods from the etcd client, so I made fakes for them based on a map.

Two test functions currently fail because they expect that it should be impossible to acquire a lock on a non-existent keyspace or shard. In etcd, parent directories are always automatically created, so matching that expectation may require an extra round-trip check on every lock, and it would likely be vulnerable to race conditions. How important is the expectation that non-existent things can't be locked?