Pelias is a geocoder powered completely by open data, available freely to everyone.
Local Installation · Cloud Webservice · Documentation · Community Chat
What is Pelias?
Pelias is a search engine for places worldwide, powered by open data. It turns addresses and place names into geographic coordinates, and turns geographic coordinates into places and addresses. With Pelias, you’re able to turn your users’ place searches into actionable geodata and transform your geodata into real places.
We think open data, open source, and open strategy win over proprietary solutions at any part of the stack and we want to ensure the services we offer are in line with that vision. We believe that an open geocoder improves over the long-term only if the community can incorporate truly representative local knowledge.
This repository contains all of the Pelias Geocoder's "acceptance" tests.
Roughly, acceptance tests are the (relatively) small set of tests by which we describe expected functionality. As much as possible, by running the acceptance tests we should be able to feel confident that nothing major is broken.
Acceptance tests can be used to validate a new Pelias installation, aid in new feature development, and ensure new features do not result in regressions.
Running the acceptance tests requires a supported version of Node.js.
$ npm install
The acceptance tests need to know how to contact your Pelias instance, and this can be configured through pelias.json
.
If your Pelias instance has an API key, you can also specify it in the credentials
section. This will be passed along as the api_key
parameter in the URL.
{
"acceptance-tests": {
"endpoints": {
"prod": "http://domain-name-of-your-pelias/v1/"
},
"credentials": {
"domain-name-of-your-pelias": "your-api-key"
}
}
}
By default, Pelias looks for pelias.json
in your home directory (~/pelias.json
).
Alternatively, you can put it anywhere, and specify the PELIAS_CONFIG
environment variable.
For example, to use a central config at /etc/pelias.json
, use the following:
$ export PELIAS_CONFIG=/etc/pelias.json
For full usage, see the fuzzy-tester usage docs.
With no parameters, all tests are run against the endpoint named prod
(Defaults to Geocode Earth if not overridden).
$ npm test
Environment names can be specified with -e
$ npm test -- -e bigdev
Specific files can be run by passing a file or "glob"
$ npm test -- -e dev my_test_suite.json
$ npm test -- -e dev my_test_suites*.json
dump results from failing tests into json files, one per failing test
$ npm test -- -e dev -o json
For a full description of what can go in tests, see the pelias-fuzzy-tester documentation