-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
# Apply the raw manifest which defines the argocd apps
kubectl apply -n argocd -f deploy-descriptors/vets/argocd.yaml
# Check it comes up (race cond on db, need to fix, delete pod if necessary)
kubectl get pods -n dev-vets
This will create the deployment pipelines for two envs of vets app in the cluster which uses the helm chart from the same directory to deploy.
In the current configuration, the dev
environment uses the develop
branch and the production
environment uses
master
branch as its source for deployment charts.
helm install vets-ci -n argo-workflows build-descriptors/vets/chart
Pretty simplistic, there is a
testing
folder within the vets
django application which houses the tests.
I wrote VetsTestRunner
which loads test data once at the start of the run from VetsTestData
. This gives a bit
of data to get off the ground. This is explicitly defined in settings.py
as the test runner for this project.
export DJANGO_SECRET_KEY="<< some long string>>>"
export DJANGO_DATABASE="local"
export DJANGO_DEBUG="True"
Just a call to:
# Grab the deps
pip install -r application/requirements.txt
# Make the initial db migration file and apply it to local DB.
python application/manage.py makemigrations
python application/manage.py migrate
# Time the big elements of the run (db creation) and verbosity == 2
# Also you can keep the db for later if you wish (this is unreliable at best for me though!)
python application/manage.py test --timing -v 2 --keepdb
Make a superuser in the db and fire up the dev server:
python application/manage.py createsuperuser
python application/manage.py runserver
python application/manage.py dbshell
# Apply the raw manifest which defines the argocd apps
kubectl apply -n argocd -f deploy-descriptors/vets/argocd.yaml
# Check it comes up (race cond on db, need to fix, delete pod if necessary)
kubectl get pods -n dev-vets
This will create the deployment pipelines for two envs of vets app in the cluster which uses the helm chart from the same directory to deploy.
In the current configuration, the dev
environment uses the develop
branch and the production
environment uses
master
branch as its source for deployment charts.