'Test that we return an error when cluster rename has no effect.'

@mock.patch('cinder.db.sqlalchemy.api.volume_include_in_cluster', auto_specs=True, return_value=0)
@mock.patch('cinder.db.sqlalchemy.api.consistencygroup_include_in_cluster', auto_specs=True, return_value=0)
@mock.patch('cinder.context.get_admin_context')
def test_cluster_commands_rename_no_changes(self, admin_ctxt_mock, volume_include_mock, cg_include_mock):

    cluster_commands = cinder_manage.ClusterCommands()
    exit = cluster_commands.rename(False, 'cluster', 'new_cluster')
    self.assertEqual(2, exit)
