Validation errors for Delete Image API - Expected response codes not received

Bug #1006033 reported by Rohit Karajgi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Jay Pipes

Bug Description

Our tempest tests fail for the following scenarios for Delete Image API validation:

1) Return an error while trying to delete an image with blank Image Id
2) Return an error while trying to delete an image with negative Image id
3) Return an error while trying to delete an image with Id having non hex characters (like '11a22b9-120q-5555-cc11-00ab112223gj')

For the above three scenarios:

Expected Error Code: 400 Bad Request
Actual Error Code: 404 NotFound

4) Return an error while trying to delete image with id over length limit (like '11a22b9-120q-5555-cc11-00ab112223gj-3fac')
Expected Error Code: 413 OverLimit
Actual Error Code: 400 BadRequest

Tags: ntt
Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote :

I tested the fourth scenario, it also returns "404 NotFound".
We can discuss which are the appropriate return code under these scenarios.
As to #1 and #2, I agree with you, "400 Bad Request" is better than "404 Not Found".
As to #3 and #4, I cannot agree with you. I don't find any naming rules of the image id. So any string can be an acceptable image id. I think "404 Not Found" is better in those situations.
"413 OverLimit" is a good choice. In HTTP status code definition, code 413 is defined as "Request Entity Too Large". It doesn't describe the situation correctly.

Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote :

Sorry these is a mistake in my previous comment.
In my mind, "413 OverLimit" is not a good choice.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

The actual response codes you documented above are correct. Update tempest.

Thierry Carrez (ttx)
affects: nova → tempest
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
assignee: nobody → Jay Pipes (jaypipes)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/9503
Committed: http://github.com/openstack/tempest/commit/257d3f847b06bbc3bed0fddde549e2ab7da13a05
Submitter: Jenkins
Branch: master

commit 257d3f847b06bbc3bed0fddde549e2ab7da13a05
Author: Jay Pipes <email address hidden>
Date: Sun Jul 8 23:01:31 2012 -0400

    Adds a script for tracking bug skips in tempest

    New file tools/skip_tracker.py can be used to show the
    status and priority of bugs that are marking test methods
    for skipping, and instruct the caller to remove skips
    on bugs that have been fixed in upstream. Output looks like this:

    jpipes@uberbox:~/repos/tempest$ python tools/skip_tracker.py
    INFO: Total bug skips found: 52
    INFO: Total unique bugs causing skips: 30
    INFO: Bug # 940500 ( Medium - Fix Released)
    INFO: Bug # 963248 ( Undecided - Invalid)
    INFO: Bug # 966249 ( Undecided - Fix Released)
    INFO: Bug # 987121 ( Medium - Fix Released)
    INFO: Bug # 988920 ( Undecided - Opinion)
    INFO: Bug # 997725 ( Medium - Fix Released)
    INFO: Bug # 999084 ( Medium - Triaged)
    INFO: Bug # 999209 ( Low - Fix Released)
    INFO: Bug # 999219 ( High - Triaged)
    INFO: Bug # 999567 ( Medium - Fix Released)
    INFO: Bug # 999594 ( Medium - In Progress)
    INFO: Bug # 999608 ( Low - Fix Released)
    INFO: Bug #1002892 ( Undecided - Invalid)
    INFO: Bug #1002901 ( Undecided - Invalid)
    INFO: Bug #1002911 ( Undecided - Invalid)
    INFO: Bug #1002918 ( Undecided - Invalid)
    INFO: Bug #1002924 ( Undecided - Incomplete)
    INFO: Bug #1002926 ( Undecided - Invalid)
    INFO: Bug #1002935 ( Undecided - Invalid)
    INFO: Bug #1004007 ( Low - Confirmed)
    INFO: Bug #1004564 ( Low - Confirmed)
    INFO: Bug #1005397 ( Undecided - Invalid)
    INFO: Bug #1005423 ( Low - Triaged)
    INFO: Bug #1006033 ( Undecided - New)
    INFO: Bug #1006725 ( Low - Triaged)
    INFO: Bug #1006857 ( Low - Confirmed)
    INFO: Bug #1006875 ( Low - Confirmed)
    INFO: Bug #1014647 ( Medium - Confirmed)
    INFO: Bug #1014683 ( Undecided - New)
    INFO: Bug #1022411 ( Undecided - In Progress)
    The following bugs have been fixed and the corresponding skips
    should be removed from the test cases:

       940500
       966249
       987121
       997725
       999209
       999567
       999608

    Change-Id: Ic58fc8beb2f6134504d4eb2f6ebe40fa24fe06f6

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
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.