Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit tests dependant on default pelias.json values #521

Closed
missinglink opened this issue May 15, 2021 · 1 comment · Fixed by #546
Closed

unit tests dependant on default pelias.json values #521

missinglink opened this issue May 15, 2021 · 1 comment · Fixed by #546
Labels

Comments

@missinglink
Copy link
Member

missinglink commented May 15, 2021

I noticed today that when I have my own local ~/pelias.json file with values in import.whosonfirst then the tests fail.
Moving or deleting ~/pelias.json make the tests pass again.

I didn't dig into it further but I'm guessing that having countryCode: US set is what's causing the issue..

    "whosonfirst": {
      "datapath": "/data/wof/sqlite",
      "sqlite": true,
      "importPostalcodes":false,
      "countryCode": "US",
      "importPlace": ["85633793"]
    }

see: #520

@missinglink missinglink changed the title unit tests dependent on default pelias.json values unit tests dependant on default pelias.json values May 15, 2021
@orangejulius
Copy link
Member

Ah yeah, I might have seen this at some point too. If not in this repo, I'm pretty sure it's possible in others.

I think the easiest way around this sort of problem is to always use an empty pelias.json when running the tests, like we did in pelias/api#1431. It's not much work to set up, and it doesn't require going through all the unit tests to find which ones might possibly behave differently with non-standard pelias.json settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants