osrm-backend/features/testbot/status.feature

74 lines
3.7 KiB
Gherkin
Raw Normal View History

2014-10-09 08:30:06 -04:00
@routing @status @testbot
2014-04-29 11:53:35 -04:00
Feature: Status messages
Background:
Given the profile "testbot"
Scenario: Route found
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
"""
Given the ways
| nodes |
| ab |
When I route I should get
| from | to | route | status | message |
2016-03-31 20:27:30 -04:00
| a | b | ab,ab | 200 | |
| b | a | ab,ab | 200 | |
2014-04-29 11:53:35 -04:00
Scenario: No route found
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
c d
"""
2014-04-29 11:53:35 -04:00
Given the ways
| nodes |
| ab |
| cd |
2014-04-29 11:53:35 -04:00
When I route I should get
| from | to | route | status | message |
2016-03-31 20:27:30 -04:00
| a | b | ab,ab | 200 | |
| c | d | cd,cd | 200 | |
2016-03-29 21:30:37 -04:00
| a | c | | 400 | Impossible route between points |
| b | d | | 400 | Impossible route between points |
Scenario: Malformed requests
Given the node locations
| node | lat | lon |
| a | 1.00 | 1.00 |
| b | 2.00 | 1.00 |
And the ways
| nodes |
| ab |
When I route I should get
| request | status | message |
| route/v1/driving/1,1;1,2 | 200 | |
| route/v1/driving/-74697224,5.191564 | 400 | Query string malformed close to position 18 |
| route/v1/driving/200,5.191564;44,5 | 400 | Invalid coordinate value. |
| nonsense | 400 | URL string malformed close to position 9: "nse" |
| nonsense/v1/driving/1,1;1,2 | 400 | Service nonsense not found! |
| | 400 | URL string malformed close to position 1: "/" |
| / | 400 | URL string malformed close to position 1: "//" |
| ? | 400 | URL string malformed close to position 1: "/?" |
| route/v1/driving | 400 | URL string malformed close to position 17: "ing" |
| route/v1/driving/ | 400 | URL string malformed close to position 18: "ng/" |
| route/v1/driving/1 | 400 | Query string malformed close to position 19 |
| route/v1/driving/1,1 | 400 | Number of coordinates needs to be at least two. |
| route/v1/driving/1,1,1 | 400 | Query string malformed close to position 21 |
| route/v1/driving/x | 400 | Query string malformed close to position 18 |
| route/v1/driving/x,y | 400 | Query string malformed close to position 18 |
| route/v1/driving/1,1; | 400 | Query string malformed close to position 21 |
| route/v1/driving/1,1;1 | 400 | Query string malformed close to position 23 |
| route/v1/driving/1,1;1,1,1 | 400 | Query string malformed close to position 25 |
| route/v1/driving/1,1;x | 400 | Query string malformed close to position 21 |
| route/v1/driving/1,1;x,y | 400 | Query string malformed close to position 21 |