'``P2PManifestationDeployer.calculate_changes`` indicates no
action necessary if the configuration has metadata for a dataset
that is a volume.
Current cluster state lacks metadata, so we want to verify no
erroneous restarts are suggested.'

def test_metadata_does_not_cause_changes(self):

    node_state = NodeState(hostname=u'node1.example.com', applications={APPLICATION_WITH_VOLUME}, manifestations={MANIFESTATION.dataset_id: MANIFESTATION}, devices={}, paths={})
    current_nodes = [node_state]
    manifestation_with_metadata = MANIFESTATION.transform(['dataset', 'metadata'], {u'xyz': u'u'})
    desired_nodes = [Node(hostname=u'node1.example.com', applications={APPLICATION_WITH_VOLUME.transform(['volume', 'manifestation'], manifestation_with_metadata)}, manifestations={MANIFESTATION.dataset_id: manifestation_with_metadata})]
    current = DeploymentState(nodes=current_nodes)
    desired = Deployment(nodes=desired_nodes)
    api = P2PManifestationDeployer(u'node1.example.com', create_volume_service(self))
    changes = api.calculate_changes(desired, current, NodeLocalState(node_state=node_state))
    self.assertEqual(changes, NO_CHANGES)
