mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Update Makefile to find correct python path for testing
This commit is contained in:
parent
1d91387f58
commit
10be375137
6
Makefile
6
Makefile
@ -378,7 +378,11 @@ test_collection:
|
||||
@if [ "$(VENV_BASE)" ]; then \
|
||||
. $(VENV_BASE)/awx/bin/activate; \
|
||||
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 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.api.serializers import SchedulePreviewSerializer
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_create_schedule(run_module, job_template, admin_user):
|
||||
my_rrule = 'DTSTART;TZID=Zulu:20200416T034507 RRULE:FREQ=MONTHLY;INTERVAL=1'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user