sixfeetup / scaf

scaf provides developers and DevOps engineers with a complete blueprint for a new project using Kubernetes
BSD 3-Clause "New" or "Revised" License
36 stars 7 forks source link

(feat) enable testing in development #185

Closed sjlawson closed 3 months ago

sjlawson commented 4 months ago

I needed to be able to run pytest locally. Currently TDD on scaf project is broken because the Dockerfile skips the tests requirements file in development. It was an easy fix that I already implemented on my becks project.

I also added .idea/ to gitignore

rochecompaan commented 4 months ago

Test requirements are installed if DEVEL=yes. Could you let me know why this is not enough?

rochecompaan commented 4 months ago

You should be able to run tests with:

kubectl exec <django-pod-id> -- pytest

We should add a Makefile target for the above.

sjlawson commented 4 months ago

Test requirements are installed if DEVEL=yes. Could you let me know why this is not enough?

This does not seem to be the case... at least in the scaf installation I have. Without TEST=yes it doesn't install the requirements/test.txt so Pytest and all it's requirements aren't installed in the django pod

rochecompaan commented 4 months ago

Apologies, I misread the Dockerfile, we do need TEST=yes.

rochecompaan commented 3 months ago

Testing in development was addressed in this PR: https://github.com/sixfeetup/scaf/pull/214