Skip to content

Commit

Permalink
feat: removing the never-used Dockerfile-testing
Browse files Browse the repository at this point in the history
* remove the dockerfile
* remove the appropriate makefile targets
* remove information about the unused testing docker from testing.rst

FIXES: APER-3434
  • Loading branch information
deborahgu committed Jun 17, 2024
1 parent 30650e4 commit 4f8b1be
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
27 changes: 0 additions & 27 deletions Dockerfile-testing

This file was deleted.

13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 0 additions & 16 deletions docs/testing.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 4f8b1be

Please sign in to comment.