FFIG / rest-api

A REST API and server for FFIG
0 stars 0 forks source link

Create stand-alone flask tests #19

Closed jbcoe closed 6 years ago

jbcoe commented 6 years ago

Flask apps can be tested without using Docker. This would potentially be simpler to maintain/run.

http://flask.pocoo.org/docs/0.12/testing/

petr-tik commented 6 years ago

I understand the difficulty of using docker.

Isn't it better to use the advantage of docker (dev = prod) and test in the same environment as we want to run it?

jbcoe commented 6 years ago

We definitely want integration testing where we do use Docker. Just pondering if a lighter testing environment might speed up work. Totally your call.

petr-tik commented 6 years ago

The way I see it.

Docker Pros

Docker Cons

Let me try unit tests in Docker and if it doesn't work out, will scrap it and write unit tests without it

petr-tik commented 6 years ago

This travis CI job takes 3m11s, of which docker pull takes 142.56s docker build takes 27.88s

Looking ahead to possible deployment scenarios - AWS Lambda (not confirmed if we are using iut yet though) doesn't support docker and takes Python programmes instead.

Overall with a potentially Dockerless prod environment, it makes sense to get rid of docker for testing