'A dataset can be moved from one node to another.
All attributes, including the maximum size, are preserved.'

@flaky(u'FLOC-3341')
@require_moving_backend
@require_cluster(2)
def test_dataset_move(self, cluster):

    waiting_for_create = create_dataset(self, cluster)
    def move_dataset(dataset):
        dataset_moving = cluster.client.move_dataset(UUID(cluster.nodes[1].uuid), dataset.dataset_id)
        moved_dataset = dataset.set(primary=UUID(cluster.nodes[1].uuid))
        dataset_moving.addCallback((lambda dataset: cluster.wait_for_dataset(moved_dataset)))
        return dataset_moving
    waiting_for_create.addCallback(move_dataset)
    return waiting_for_create
