cinder/cinder/tests
Gorka Eguileor 7a66835d4a Fix replication_status on InvalidReplicationTarget
When we cannot do a replication failover because the driver raises an
InvalidReplicationTarget exception we revert the replication status from
"failing-over" to its previous status.

Since we are not saving the previous status we were deciding what it was
based on the requested secondary_backend_id, which is wrong, as it
assumes we cannot failover from one secondary to another secondary.

This patch fixes this by changing the deciding factor from the
secondary_backend_id to the current backend_id in the service.

We had no failover_host manager tests, and this patch doesn't try to add
all the tests that we should have, it just adds the tests pertinent for
this patch to avoid regressions and test this specific functionality.
Missing tests should be added in another patch.

Closes-Bug: #1641715
Change-Id: I5a911278aef8060e14577099b0e03daf2039a783
2016-12-05 20:10:50 +01:00
..
compliance Use assertEqual/Less/Greater/In/IsNone 2016-07-04 17:58:16 +02:00
functional Fix typo in test_quotas.py 2016-11-21 16:56:40 +08:00
tempest Remove logging import unused 2016-10-20 16:35:50 +08:00
unit Fix replication_status on InvalidReplicationTarget 2016-12-05 20:10:50 +01:00
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
fake_driver.py Add logging to FakeLoggingVolumeDriver 2016-11-29 14:25:36 +00:00
fixtures.py Copy StandardLogging fixture from Nova 2016-02-29 17:46:31 -05:00