From 4f8b1be44f6a0e5f5891375212b06f293c60d5df Mon Sep 17 00:00:00 2001 From: Deborah Kaplan Date: Mon, 17 Jun 2024 16:36:56 +0000 Subject: [PATCH] feat: removing the never-used Dockerfile-testing * remove the dockerfile * remove the appropriate makefile targets * remove information about the unused testing docker from testing.rst FIXES: APER-3434 --- Dockerfile-testing | 27 --------------------------- Makefile | 13 ------------- docs/testing.rst | 16 ---------------- 3 files changed, 56 deletions(-) delete mode 100644 Dockerfile-testing diff --git a/Dockerfile-testing b/Dockerfile-testing deleted file mode 100644 index 92eac565a..000000000 --- a/Dockerfile-testing +++ /dev/null @@ -1,27 +0,0 @@ -# Image for testing outside of CI. Instead of using the ansible generated base image, -# this will run similar to CI in that it is a base Ubuntu image with minimal packages -# installed on top. - -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - firefox \ - xvfb \ - build-essential \ - python3.8-dev \ - python3-pip \ - libmysqlclient-dev \ - gettext \ - git \ - curl -RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && apt-get install -y nodejs # NOTE: This installs node LTS which is v14 currently -RUN ln -s /usr/bin/pip3 /usr/bin/pip -RUN ln -s /usr/bin/python3 /usr/bin/python -RUN mkdir -p /edx/app/credentials/ -WORKDIR /edx/app/credentials -COPY ./requirements/ /edx/app/credentials/requirements/ -COPY ./package.json /edx/app/credentials/package.json -COPY ./package-lock.json /edx/app/credentials/package-lock.json -COPY ./Makefile /edx/app/credentials/Makefile -RUN make requirements diff --git a/Makefile b/Makefile index 99d1c3b82..45d430e34 100644 --- a/Makefile +++ b/Makefile @@ -172,18 +172,5 @@ pii_check: ## Check for PII annotations on all Django models coverage: coverage xml -### Local testing suite commands ### - -build_test_image: # Builds Docker image used for testing so devs don't need to install requirements locally (useful for firefox / xvfb) - docker build -t credentials:local -f Dockerfile-testing . - -# This should be ran locally, not inside of the devstack container -quality_and_translations_tests_suite: build_test_image - docker run -e "TERM=xterm-256color" -v /edx/app/credentials/node_modules/ -v `pwd`:/edx/app/credentials/ credentials:local bash -c 'cd /edx/app/credentials/ && make check_translations_up_to_date && make validate_translations && make quality && make check_keywords && make pii_check' - -# This should be ran locally, not inside of the devstack container -unit_tests_suite: build_test_image - docker run -e "TERM=xterm-256color" -v /edx/app/credentials/node_modules/ -v `pwd`:/edx/app/credentials/ credentials:local bash -c 'cd /edx/app/credentials/ && make static && make tests && make coverage' - docs: tox -e docs diff --git a/docs/testing.rst b/docs/testing.rst index 7d64acbcb..b11556066 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -1,22 +1,6 @@ Testing ======= -In order for developers to have a consistent experience between CI and local testing, we are using a locally built -container image that mimics the ones that Github Actions uses. - -NOTE: The first time you run any of the test suites below, it -will build the image which will take a few minutes. Following test runs will be quicker. - -To make testing easier, there are a few commands that mirror our suites in CI: - -.. code-block:: bash - - $ make unit_tests_suite - $ make quality_and_translations_tests_suite - -This will run the Python, the Javascript tests, and our quality and translation suite, respectively. - - Writing Python Tests -------------------- Tests should be written for all new features. The `Django docs`_ are a good resource for learning how to test Django code.