ClusterHQ/flocker — pull request #262 by wallrj (2014-07-10 17:55:11+00:00)
Title: List all gear units including dead ones

I've added the `?all=` to the gear list url and added a test which demonstrates the effect.

But I'm not entirely sure which extra states are included by making that change.

For example `failed` units (eg units created with a non-existent docker image name) are listed *anyway*.

I'm also not sure how units get into the `dead` state. The example in my test (and the example that @itamarst used in https://github.com/ClusterHQ/flocker/issues/208#issuecomment-48231413) recreate the dead state by creating a gear unit using the busybox image which exits immediately with a 0 status code. I'd have thought that systemd would attempt to restart such units a few times before marking them failed, but that doesn't seem to happen.

I also need some guidance around how to wait for the unit-under-test to reach the `dead` state. I can test the current state using `systemctl`, but that won't make any sense when running these tests against the FakeGearClient.
Perhaps this particular test should be move to the implementation specific `flocker.node.functional.test_gear.GearClientTests` case.

Fixes: #208