diff --git a/Makefile b/Makefile index b62ff31c76..d92982f844 100644 --- a/Makefile +++ b/Makefile @@ -152,13 +152,20 @@ develop: @if [ "$(VIRTUAL_ENV)" ]; then \ pip uninstall -y awx; \ $(PYTHON) setup.py develop; \ - awx-manage register_instance --primary --ip-address=127.0.0.1; \ else \ sudo pip uninstall -y awx; \ sudo $(PYTHON) setup.py develop; \ sudo awx-manage register_instance --primary --ip-address=127.0.0.1; \ fi +# Do any one-time init tasks. +init: + @if [ "$(VIRTUAL_ENV)" ]; then \ + awx-manage register_instance --primary --ip-address=127.0.0.1; \ + else \ + sudo awx-manage register_instance --primary --ip-address=127.0.0.1; \ + fi + # Refresh development environment after pulling new code. refresh: clean requirements develop migrate diff --git a/awx/main/tests/tasks.py b/awx/main/tests/tasks.py index 93a6bdd97f..0b401fb7ea 100644 --- a/awx/main/tests/tasks.py +++ b/awx/main/tests/tasks.py @@ -9,6 +9,7 @@ import os import shutil import subprocess import tempfile +import unittest # Django from django.conf import settings @@ -1340,6 +1341,8 @@ class RunJobTest(BaseCeleryTest): self.check_job_result(job, 'successful') self.check_job_events(job, 'ok', 1, 3, has_roles=True) + @unittest.skipUnless(settings.BROKER_URL == 'redis://localhost/', + 'Non-default Redis setup.') def test_run_job_with_proot(self): # Only run test if proot is installed cmd = [getattr(settings, 'AWX_PROOT_CMD', 'proot'), '--version'] diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 1fbd7c27f3..6e3bb1c4ea 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -274,7 +274,7 @@ SOUTH_TESTS_MIGRATE = False import djcelery djcelery.setup_loader() -BROKER_URL = 'django://' +BROKER_URL = 'redis://localhost/' CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] diff --git a/awx/settings/local_settings.py.example b/awx/settings/local_settings.py.example index 40b3f1d8d9..a293a8dadd 100644 --- a/awx/settings/local_settings.py.example +++ b/awx/settings/local_settings.py.example @@ -44,7 +44,7 @@ if len(sys.argv) >= 2 and sys.argv[1] == 'test': } # Celery AMQP configuration. -BROKER_URL = 'amqp://awx-dev:AWXsome1@localhost:5672/awx-dev' +BROKER_URL = 'redis://localhost/' # Set True to enable additional logging from the job_event_callback plugin JOB_CALLBACK_DEBUG = False