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

Gisgraphy tests fail due to missing key #48

Open
karussell opened this issue Apr 12, 2018 · 7 comments
Open

Gisgraphy tests fail due to missing key #48

karussell opened this issue Apr 12, 2018 · 7 comments

Comments

@karussell
Copy link
Member

We could put our API key for gisgraphy in the hidden section here at github, but highly likely it will be exposed in the logging. Or should we temporary disable gisgraphy tests for travis?

@gisgraphy
Copy link
Contributor

I suggest using the demo server https://services.gisgraphy.com/

@karussell
Copy link
Member Author

karussell commented Apr 12, 2018

It would still fail:

testHandleReverse(com.graphhopper.converter.resource.ConverterResourceGisgraphyTest): expected:<[2]00> but was:<[4]00>
testHandleForward(com.graphhopper.converter.resource.ConverterResourceGisgraphyTest): expected:<[2]00> but was:<[4]00>

@gisgraphy
Copy link
Contributor

I suggest that you put a user-agent that I accept on server side on the demo server, as I have done on this PR : DenisCarriere/geocoder@a0248e3

what about 'geocoder-converter'

@karussell
Copy link
Member Author

Ok

@gisgraphy
Copy link
Contributor

gisgraphy commented Apr 12, 2018

Please add a user agent only for tests (something like a variable only feed in tests) I don t want to white list all the users of the geocoder converter 😊

@boldtrn
Copy link
Member

boldtrn commented Apr 13, 2018

Please add a user agent only for tests (something like a variable only feed in tests) I don t want to white list all the users of the geocoder converter blush

Wouldn't it be easier to create a very limited key for this purpose? Changing the user-agent is a possible solution, but since we make this transparent, every user could just switch to the geocoding-converter user agent as well.

Anyway changing the user agent just for tests seems to be not straight forward. We could add a config variable to change the user-agent (maybe we do this globally for all providers or only gisgraphy). Then we would set geocoder-converter as user-agent in the test converter.yml. This also requires a change of ConverterResourceGisgraphy where we add the user-agent to every request to the server. This means that also production requests get a user-agent (can be different from the test user-agent though).

@gisgraphy
Copy link
Contributor

That 's I got in mind too :-). Just put a user-agent different for the tests.

what about 'geocoder-converter' for the "main software" and 'geocoder-converter' for tests?

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

No branches or pull requests

3 participants