django_manage: add extra tests (#5476)

This commit is contained in:
Alexei Znamensky 2022-11-06 23:38:38 +13:00 committed by GitHub
commit fc817601bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -67,3 +67,18 @@
project_path: "{{ tmp_django_root.path }}/simple_project/p1"
command: collectstatic --noinput
virtualenv: "{{ tmp_django_root.path }}/venv"
- name: Trigger exception with environment variable
community.general.django_manage:
project_path: "{{ tmp_django_root.path }}/simple_project/p1"
command: collectstatic --noinput
virtualenv: "{{ tmp_django_root.path }}/venv"
environment:
DJANGO_ANSIBLE_RAISE: blah
ignore_errors: true
register: env_raise
- name: Check env variable reached manage.py
ansible.builtin.assert:
that:
- "'ValueError: DJANGO_ANSIBLE_RAISE=blah' in env_raise.msg"