Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.26 KB | None | 0 0
  1. diff --git a/nova/tests/unit/objects/test_instance_pci_requests.py b/nova/tests/unit/objects/test_instance_pci_requests.py
  2. index 3a19be4..b1ff903 100644
  3. --- a/nova/tests/unit/objects/test_instance_pci_requests.py
  4. +++ b/nova/tests/unit/objects/test_instance_pci_requests.py
  5. @@ -96,6 +96,19 @@ class TestInstancePCIRequestSpec(test.NoDBTestCase):
  6.  
  7.  
  8.  class _TestInstancePCIRequests(object):
  9. +    def test_old_node_sends_old_format_to_new_node(self):
  10. +        # This is what a primitive from v1.1 would look like
  11. +        request_v1_1 = {'nova_object.changes': ['count'],
  12. +                        'nova_object.data': {'spec': [{'foo': 'bar'}]},
  13. +                        'nova_object.name': 'InstancePCIRequest',
  14. +                        'nova_object.namespace': 'nova',
  15. +                        'nova_object.version': '1.2'}
  16. +
  17. +        # Pretend we're a new node receiving the above over RPC from
  18. +        # either an older node, or a node who has backported it
  19. +        # to v1.1 because there are old nodes in the cluster.
  20. +        objects.InstancePCIRequest.obj_from_primitive(request_v1_1)
  21. +
  22.      @mock.patch('nova.db.instance_extra_get_by_instance_uuid')
  23.      def test_get_by_instance_uuid(self, mock_get):
  24.          pci_requests = copy.deepcopy(fake_pci_requests)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement