Nailgun validators should be unit-tested, not integration-tested

Registered by Nikolay Markov

We already have two types of tests - integration and unit. But integration tests are outnumbering units dramatically. Here's what we can do with it:

- All validators should be ONLY unit-tested, with various input data and checking errors raised.
- There should be some kind of basic mapping of standard validation errors onto HTTP error codes, for example:
   * errors.AlreadyExists : HTTP 409
   * errors.InvalidData : HTTP 400
   * errors.CannotCreateObject: HTTP 400
and so on. This code should be located in basic handler and tested by integration tests
- All handlers which use validators raising errors which are not in the list of standard ones, should be tested on proper reaction on raising this error by passing sample invalid data in integration tests.
- All other tests and hacks on REST data validation may be removed, because we won't need them anymore.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Nikolay Markov
Direction:
Needs approval
Assignee:
Fuel Python (Deprecated)
Definition:
Discussion
Series goal:
Accepted for future
Implementation:
Not started
Milestone target:
milestone icon next

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.