Juan Hernandez has posted comments on this change.

Change subject: restapi: return 404 when there are inexisting resources on path
......................................................................


Patch Set 26:

(1 comment)

https://gerrit.ovirt.org/#/c/39499/26/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostNetworkAttachmentsResourceTest.java
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostNetworkAttachmentsResourceTest.java:

Line 10:             @Override
Line 11:             protected void verifyIfHostExistsToHandle404StatusCode() {
Line 12:                 //very disgusting hack. Test dictates, that 400 is 
returned in case of wrong parameters. But 404
Line 13:                 // has precedence to that, so production code should 
be able to return 404 when necessary, but I
Line 14:                 // have no idea how to convince rests test to be ok 
with that. Any help welcomed.
> thanks for example patch; with it I was able to fix those test. However tho
Ok, the performance impact is acceptable.

Referencing a resource that doesn't exist should always return 404, not 200, 
that is something we should fix in the future for all resources. So in these 
regards your patch is perfectly ok.
Line 15:             }
Line 16:         }, VdcQueryType.GetNetworkAttachmentsByHostId);
Line 17:     }


-- 
To view, visit https://gerrit.ovirt.org/39499
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3e96ebfee8bbf2c6c1714d9d652fa5cc5e46886
Gerrit-PatchSet: 26
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to