smithfarm / dochazka-cli

Dochazka CLI client
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Mock up REST server #40

Open smithfarm opened 7 years ago

smithfarm commented 7 years ago

Currently there are functional tests in t/ that require a connection to a real REST server. Since this is unfeasible in Travis CI, we could convert these to unit tests by mocking up the REST server.

tampakrap commented 7 years ago

just for the record, we can set up a REST server in travis, but that is not the reason. Reasons are: integration tests have to be fast, they don't have to be dependent on errors of middleware services etc. I can share good talks regarding about this if you want

smithfarm commented 7 years ago

It makes sense to mock up the REST server for the CLI unit tests, but we still have to run them against a real REST server occasionally because, over time, the real REST server might diverge from the mocked-up one.

tampakrap commented 7 years ago

if they diverge, that's a bug in the mocked server. It is different layer of test to do it against real REST server and against the mocked one

tampakrap commented 7 years ago

and I am not implying not to run against real REST server

smithfarm commented 7 years ago

and I am not implying not to run against real REST server

Understood, and agreed.