Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Unit tests use remote API instance #255

Open
pnorman opened this issue Jul 13, 2015 · 1 comment
Open

Unit tests use remote API instance #255

pnorman opened this issue Jul 13, 2015 · 1 comment

Comments

@pnorman
Copy link

pnorman commented Jul 13, 2015

A number of tests in APITests.cs interact with api06.dev.openstreetmap.org. This is an issue for a few reasons

  • The test API isn't really designed for unit tests. About half the changesets on it are now from osmsharp
  • The credentials used are hard-coded in the source code. Anyone could change the password
  • OAuth is not used, nor does it appear to be tested. OAuth should be the standard
  • Unit tests shouldn't interact with external services, particularly those outside the developers control. This makes the unit tests no longer a unit test, but a test of the external service as well. Instead, the external service should be mocked up
@pnorman pnorman changed the title Unit tests use live API Unit tests use live API instance Jul 13, 2015
@pnorman pnorman changed the title Unit tests use live API instance Unit tests use remote API instance Jul 13, 2015
xivk added a commit that referenced this issue Jul 13, 2015
@xivk
Copy link
Contributor

xivk commented Jul 13, 2015

Couldn't agree more, already removed the tests!

Rest of the remarks make sense but it may be better to remove everything related to talking to the OSM-API instead of making the effort to update.

xivk added a commit that referenced this issue Jul 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants