Complement Update Server Metadata tests

Bug #1088878 reported by Mauro S M Rodrigues
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Mauro S M Rodrigues

Bug Description

There is no Update Metadata server (http://docs.openstack.org/api/openstack-compute/2/content/Update_Metadata-d1e5208.html ) unit tests.
Note Update Metadata (it's a POST) != Set Metadata (it's a PUT)
So there is no tests to
    Success
    BadRequest
    HTTPRequestEntityTooLarge
    ItemNotFound
They are pretty much like the Set Metadata servers, but not the same, so if eventually one of them change we have both tested on unit test and that's the good reason to do it.

Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → Low
Changed in nova:
assignee: nobody → Mauro Sergio Martins Rodrigues (maurosr)
Revision history for this message
Giampaolo Lauria (lauria) wrote :

At first glance, it looks like the Update metadata tests do exist but under different names.
def test_create(self) seems to be testing the update, whereas def test_update* seem to be testing create.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/18811

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Mauro S M Rodrigues (maurorodrigues) wrote :

Hi Giampaolo! That's exactly that, in the extension create and update_all both use _update_instance_metadata so most of those test don't need to be re-created, although there is no call to update_all method and the fix proposed add this test to update metadata using update_all method. (It's also mentioned in the commit message)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/18811
Committed: http://github.com/openstack/nova/commit/1c6bb73b3df355b0100212e8732c8be16ee63624
Submitter: Jenkins
Branch: master

commit 1c6bb73b3df355b0100212e8732c8be16ee63624
Author: Mauro S. M. Rodrigues <email address hidden>
Date: Wed Jan 2 08:43:39 2013 -0500

    Add unit test to update server metadata

    Fixes bug: 1088878
    Partially implements blueprint nova-v2-api-audit

    The bug description points to 4 situations to be tested, although those
    situations are already tested on create metadata tests which use the same
    method as update_all to operate over metadata (_update_instance_metadata) so no
    more tests are needed.

    Change-Id: Ifae3c69c0e00c361ae36f5a8dede835c96568d11

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.