Fix instability with volume attachment RBAC tests
This patchset fixes instability with volume attachment
RBAC tests. The tests are currently failing due to volumes
failing to reach the expected statuses due to insufficiently
robust waiters or due to sharing of class-wide resources
(volumes, servers) [0]. Lack of resource idempotency is likely
compounding waiter issues.
So this patchset resolves the issue by creating a volume/server
per test and removing the shared class-wide versions. It also
adds a `wait_for_server_volume_swap` call to
`test_update_volume_attachment` which was previously missing
even though the test does a volume swap.
Finally, the test `test_create_volume_attachment` now
more atomically tests `attach_volume` API action by
calling the API directly in the contextmanager (while
the role is overridden) and only afterward invokes the
waiter to wait for the volume status to change.
[0] e.g. http://logs.openstack.org/21/571621/1/check/patrole-multinode-admin/395b4fb/job-output.txt.gz#_2018-06-01_04_06_10_109536
Change-Id: Ib78ccc3cad7689c0c5a7daf10ec5eeb2ee7a03ab
1 file changed