mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 04:17:36 -02:30
Update Makefile to find correct python path for testing
This commit is contained in:
6
Makefile
6
Makefile
@@ -378,7 +378,11 @@ test_collection:
|
|||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
. $(VENV_BASE)/awx/bin/activate; \
|
||||||
fi; \
|
fi; \
|
||||||
PYTHONPATH=$PYTHONPATH:/usr/lib/python3.6/site-packages py.test $(COLLECTION_TEST_DIRS)
|
PYTHONPATH=$(PYTHONPATH):$(VENV_BASE)/awx/lib/python3.6/site-packages:/usr/lib/python3.6/site-packages py.test $(COLLECTION_TEST_DIRS)
|
||||||
|
# The python path needs to be modified so that the tests can find Ansible within the container
|
||||||
|
# First we will use anything expility set as PYTHONPATH
|
||||||
|
# Second we will load any libraries out of the virtualenv (if it's unspecified that should be ok because python should not load out of an empty directory)
|
||||||
|
# Finally we will add the system path so that the tests can find the ansible libraries
|
||||||
|
|
||||||
flake8_collection:
|
flake8_collection:
|
||||||
flake8 awx_collection/ # Different settings, in main exclude list
|
flake8 awx_collection/ # Different settings, in main exclude list
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ from ansible.errors import AnsibleError
|
|||||||
from awx.main.models import Schedule
|
from awx.main.models import Schedule
|
||||||
from awx.api.serializers import SchedulePreviewSerializer
|
from awx.api.serializers import SchedulePreviewSerializer
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_create_schedule(run_module, job_template, admin_user):
|
def test_create_schedule(run_module, job_template, admin_user):
|
||||||
my_rrule = 'DTSTART;TZID=Zulu:20200416T034507 RRULE:FREQ=MONTHLY;INTERVAL=1'
|
my_rrule = 'DTSTART;TZID=Zulu:20200416T034507 RRULE:FREQ=MONTHLY;INTERVAL=1'
|
||||||
|
|||||||
Reference in New Issue
Block a user