We should build a few high level end-to-end integration tests with as few mocks as possible that simply test the overall behavior of the app. This will help prevent issues like #18.
Initial integration tests should launch Zookeeper in the background (using the KazooTestHarness if possible), actually connect into Zookeeper, and handle the following scenarios.
Watch a path with min_children 1...
Where 0 children exist
Where 1 child exists
Where 1 child exists, and then goes away (should alert)
Where >1 child exists, and then one goes away (should NOT alert)
Watch a path with min_children 0...
Should NOT alert
Should be aware of all changes though
Get a Dispatcher lock and ...
Ensure that it does alert
Ensure that if the Dispatcher lock is unavailable, does NOT alert
We should build a few high level end-to-end integration tests with as few mocks as possible that simply test the overall behavior of the app. This will help prevent issues like #18.