mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 11:57:37 -02:30
Merge pull request #6635 from AlanCoding/no_tower_cli
Remove tower-cli from Zuul CI for AWX collection Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
10
Makefile
10
Makefile
@@ -18,7 +18,6 @@ COMPOSE_TAG ?= $(GIT_BRANCH)
|
|||||||
COMPOSE_HOST ?= $(shell hostname)
|
COMPOSE_HOST ?= $(shell hostname)
|
||||||
|
|
||||||
VENV_BASE ?= /venv
|
VENV_BASE ?= /venv
|
||||||
COLLECTION_VENV ?= /awx_devel/awx_collection_test_venv
|
|
||||||
SCL_PREFIX ?=
|
SCL_PREFIX ?=
|
||||||
CELERY_SCHEDULE_FILE ?= /var/lib/awx/beat.db
|
CELERY_SCHEDULE_FILE ?= /var/lib/awx/beat.db
|
||||||
|
|
||||||
@@ -365,11 +364,6 @@ test:
|
|||||||
cd awxkit && $(VENV_BASE)/awx/bin/tox -re py2,py3
|
cd awxkit && $(VENV_BASE)/awx/bin/tox -re py2,py3
|
||||||
awx-manage check_migrations --dry-run --check -n 'vNNN_missing_migration_file'
|
awx-manage check_migrations --dry-run --check -n 'vNNN_missing_migration_file'
|
||||||
|
|
||||||
prepare_collection_venv:
|
|
||||||
rm -rf $(COLLECTION_VENV)
|
|
||||||
mkdir $(COLLECTION_VENV)
|
|
||||||
$(VENV_BASE)/awx/bin/pip install --target=$(COLLECTION_VENV) git+https://github.com/ansible/tower-cli.git
|
|
||||||
|
|
||||||
COLLECTION_TEST_DIRS ?= awx_collection/test/awx
|
COLLECTION_TEST_DIRS ?= awx_collection/test/awx
|
||||||
COLLECTION_TEST_TARGET ?=
|
COLLECTION_TEST_TARGET ?=
|
||||||
COLLECTION_PACKAGE ?= awx
|
COLLECTION_PACKAGE ?= awx
|
||||||
@@ -380,12 +374,12 @@ test_collection:
|
|||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
. $(VENV_BASE)/awx/bin/activate; \
|
||||||
fi; \
|
fi; \
|
||||||
PYTHONPATH=$(COLLECTION_VENV):$PYTHONPATH:/usr/lib/python3.6/site-packages py.test $(COLLECTION_TEST_DIRS)
|
PYTHONPATH=$PYTHONPATH:/usr/lib/python3.6/site-packages py.test $(COLLECTION_TEST_DIRS)
|
||||||
|
|
||||||
flake8_collection:
|
flake8_collection:
|
||||||
flake8 awx_collection/ # Different settings, in main exclude list
|
flake8 awx_collection/ # Different settings, in main exclude list
|
||||||
|
|
||||||
test_collection_all: prepare_collection_venv test_collection flake8_collection
|
test_collection_all: test_collection flake8_collection
|
||||||
|
|
||||||
# WARNING: symlinking a collection is fundamentally unstable
|
# WARNING: symlinking a collection is fundamentally unstable
|
||||||
# this is for rapid development iteration with playbooks, do not use with other test targets
|
# this is for rapid development iteration with playbooks, do not use with other test targets
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ def run_module(request, collection_import):
|
|||||||
raise Exception('Module did not write valid JSON, error: {0}, stdout:\n{1}'.format(str(e), module_stdout))
|
raise Exception('Module did not write valid JSON, error: {0}, stdout:\n{1}'.format(str(e), module_stdout))
|
||||||
# A module exception should never be a test expectation
|
# A module exception should never be a test expectation
|
||||||
if 'exception' in result:
|
if 'exception' in result:
|
||||||
|
if "ModuleNotFoundError: No module named 'tower_cli'" in result['exception']:
|
||||||
|
pytest.skip('The tower-cli library is needed to run this test, module no longer supported.')
|
||||||
raise Exception('Module encountered error:\n{0}'.format(result['exception']))
|
raise Exception('Module encountered error:\n{0}'.format(result['exception']))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user