mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
add JSON format to /status endpoint (#1013)
add JSON format to /status endpoint
This commit is contained in:
17
test/bdd/api/status/failures.feature
Normal file
17
test/bdd/api/status/failures.feature
Normal file
@@ -0,0 +1,17 @@
|
||||
@UNKNOWNDB
|
||||
Feature: Status queries against unknown database
|
||||
Testing status query
|
||||
|
||||
Scenario: Failed status as text
|
||||
When sending text status query
|
||||
Then a HTTP 500 is returned
|
||||
And the page contents equals "ERROR: No database"
|
||||
|
||||
Scenario: Failed status as json
|
||||
When sending json status query
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And results contain
|
||||
| status | message |
|
||||
| 700 | No database |
|
||||
And result has not attributes data_updated
|
||||
16
test/bdd/api/status/simple.feature
Normal file
16
test/bdd/api/status/simple.feature
Normal file
@@ -0,0 +1,16 @@
|
||||
@APIDB
|
||||
Feature: Status queries
|
||||
Testing status query
|
||||
|
||||
Scenario: Status as text
|
||||
When sending status query
|
||||
Then a HTTP 200 is returned
|
||||
And the page contents equals "OK"
|
||||
|
||||
Scenario: Status as json
|
||||
When sending json status query
|
||||
Then the result is valid json
|
||||
And results contain
|
||||
| status | message |
|
||||
| 0 | OK |
|
||||
And result has attributes data_updated
|
||||
Reference in New Issue
Block a user