kytos-ng / kytos-end-to-end-tests

Kytos End-to-End Tests
0 stars 10 forks source link

Cover @validate decorator e2e regression test #217

Closed viniarck closed 1 year ago

viniarck commented 1 year ago

Currently we have some tests validating requests, specifically for mef_eline, but we don't have much coverage about the expected response, that front-end also relies, since we're upgrading implementation details we'll need this e2e to ensure that no regression happens. For instance, here's an invalid payload for POST /api/kytos/mef_eline/v2/evc/, we should assert this response structure.

{
    "name": "epl",
    "service_level": 7,
    "dynamic_backup_path": true,
    "uni_a": {
        "interface_id": 1
    },
    "uni_z": {
        "interface_id": "00:00:00:00:00:00:00:03:1"
    }
}
{
    "code": 400,
    "description": "The request body contains invalid API data. 1 is not of type 'string' for field uni_a/interface_id.",
    "name": "Bad Request"
}