escargot icon indicating copy to clipboard operation
escargot copied to clipboard

Feature request: Disable updates in test environment

Open pfeiffer opened this issue 14 years ago • 2 comments

It would be nice if Escargot per default didn't update ElasticSearch when running in test environment. At the moment it can be controlled by passing :updates => false conditionally, but it feels kinda clumsy and I guess most of the times you wouldn't want to populate the indices in test-mode unless you're specifically testing the ES-indexes.

pfeiffer avatar Jan 07 '11 02:01 pfeiffer

Hi,

I feel that the default should be to test the full stack - after all this is the default with databases too. Maybe what we should do is adding documentation of what methods to mock if you want to disable indexing in test mode?

angelf avatar Jan 07 '11 11:01 angelf

Yeah, that could be an option.

I do however still think it makes sense only to populate ElasticSearch when specifically asked to in test environments. A typical test suite only contains a few specific tests to cover the indexing, so for the most part the ES-updating is an overhead.

Full stack testing should be done via integration tests :-)

pfeiffer avatar Jan 07 '11 14:01 pfeiffer