diff --git a/Makefile b/Makefile index 0dc2f5bbf1..147f430e96 100644 --- a/Makefile +++ b/Makefile @@ -298,7 +298,7 @@ requirements_jenkins: else \ pip install -Ir requirements/requirements_jenkins..txt; \ fi && \ - $(NPM_BIN) install csslint jshint + $(NPM_BIN) install csslint requirements: requirements_ansible requirements_tower @@ -435,13 +435,22 @@ check: flake8 pep8 # pyflakes pylint TEST_DIRS=awx/main/tests # Run all API unit tests. test: + @if [ "$(VENV_BASE)" ]; then \ + . $(VENV_BASE)/tower/bin/activate; \ + fi; \ py.test $(TEST_DIRS) test_unit: + @if [ "$(VENV_BASE)" ]; then \ + . $(VENV_BASE)/tower/bin/activate; \ + fi; \ py.test awx/main/tests/unit # Run all API unit tests with coverage enabled. test_coverage: + @if [ "$(VENV_BASE)" ]; then \ + . $(VENV_BASE)/tower/bin/activate; \ + fi; \ py.test --create-db --cov=awx --cov-report=xml --junitxml=./reports/junit.xml $(TEST_DIRS) # Output test coverage as HTML (into htmlcov directory). @@ -478,6 +487,13 @@ ui-test: ui-deps-built ui-test-ci: ui-deps-built $(NPM_BIN) --prefix awx/ui run test:ci +testjs_ci: + echo "Update UI unittests later" #ui-test-ci + +jshint: ui-deps-built + grunt --gruntfile awx/ui/Gruntfile.js jshint + # Depends on node 6.x and npm 3.x installed on Jenkins slave + ui-test-saucelabs: ui-deps-built $(NPM_BIN) --prefix awx/ui run test:saucelabs diff --git a/awx/main/queue.py b/awx/main/queue.py index b1cc7694fd..b0b8d0374e 100644 --- a/awx/main/queue.py +++ b/awx/main/queue.py @@ -3,8 +3,6 @@ import json -from django.conf import settings - __all__ = ['FifoQueue'] # TODO: Figure out wtf to do with this class diff --git a/requirements/requirements_dev.txt b/requirements/requirements_dev.txt index d848638306..f58cda659e 100644 --- a/requirements/requirements_dev.txt +++ b/requirements/requirements_dev.txt @@ -5,7 +5,7 @@ unittest2 pep8 flake8 pyflakes==1.0.0 # Pinned until PR merges https://gitlab.com/pycqa/flake8/merge_requests/56 -pytest +pytest==2.9.2 pytest-cov pytest-django pytest-pythonpath diff --git a/requirements/requirements_jenkins.txt b/requirements/requirements_jenkins.txt index ff3fda270f..287a714939 100644 --- a/requirements/requirements_jenkins.txt +++ b/requirements/requirements_jenkins.txt @@ -6,7 +6,7 @@ pylint flake8 distribute==0.7.3 unittest2 -pytest +pytest==2.9.2 pytest-cov pytest-django pytest-pythonpath diff --git a/tools/docker-compose/Dockerfile b/tools/docker-compose/Dockerfile index 8609b27b53..c583c4ddfd 100644 --- a/tools/docker-compose/Dockerfile +++ b/tools/docker-compose/Dockerfile @@ -12,7 +12,7 @@ RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - RUN yum -y localinstall http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm ADD tools/docker-compose/proot.repo /etc/yum.repos.d/proot.repo RUN yum -y update && yum -y install openssh-server ansible mg vim tmux git mercurial subversion python-devel python-psycopg2 make postgresql postgresql-devel nodejs python-psutil libxml2-devel libxslt-devel libstdc++.so.6 gcc cyrus-sasl-devel cyrus-sasl openldap-devel libffi-devel zeromq-devel proot python-pip xmlsec1-devel swig krb5-devel xmlsec1-openssl xmlsec1 xmlsec1-openssl-devel libtool-ltdl-devel -RUN pip install flake8 pytest pytest-pythonpath pytest-django pytest-cov pytest-mock dateutils django-debug-toolbar==1.4 pyflakes==1.0.0 virtualenv +RUN pip install flake8 pytest==2.9.2 pytest-pythonpath pytest-django pytest-cov pytest-mock dateutils django-debug-toolbar==1.4 pyflakes==1.0.0 virtualenv RUN /usr/bin/ssh-keygen -q -t rsa -N "" -f /root/.ssh/id_rsa RUN mkdir -p /etc/tower RUN mkdir -p /data/db