pelias / config

Configuration file for Pelias
8 stars 33 forks source link

Tests fail if PELIAS_CONFIG environment variable is set #27

Open orangejulius opened 8 years ago

orangejulius commented 8 years ago

I set PELIAS_CONFIG in my .bashrc file so that pelias.json does not clutter up my home directory. However, I have to unset that variable in order for the tests to pass.

missinglink commented 8 years ago

see setup() and teardown() functions here for an example of how to avoid this issue.

It might be best to create a more formal way of enforcing the default config during testing across all our repos.

orangejulius commented 8 years ago

We've started using proxyquire in some places with relatively good results. I like that it completely removes any dependency on the actual pelias-config code, the filesystem, and env vars