chore: rename test settings and shorten runserver instructions (#6131)
This commit is contained in:
parent
540c4895bf
commit
73137364cc
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -137,9 +137,9 @@ jobs:
|
||||||
echo "Running tests..."
|
echo "Running tests..."
|
||||||
if [[ "x${{ github.event.inputs.ignoreLowerCoverage }}" == "xtrue" ]]; then
|
if [[ "x${{ github.event.inputs.ignoreLowerCoverage }}" == "xtrue" ]]; then
|
||||||
echo "Lower coverage failures will be ignored."
|
echo "Lower coverage failures will be ignored."
|
||||||
./ietf/manage.py test --validate-html-harder --settings=settings_postgrestest --ignore-lower-coverage
|
./ietf/manage.py test --validate-html-harder --settings=settings_test --ignore-lower-coverage
|
||||||
else
|
else
|
||||||
./ietf/manage.py test --validate-html-harder --settings=settings_postgrestest
|
./ietf/manage.py test --validate-html-harder --settings=settings_test
|
||||||
fi
|
fi
|
||||||
coverage xml
|
coverage xml
|
||||||
|
|
||||||
|
|
2
.github/workflows/ci-run-tests.yml
vendored
2
.github/workflows/ci-run-tests.yml
vendored
|
@ -45,7 +45,7 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Running tests..."
|
echo "Running tests..."
|
||||||
./ietf/manage.py test --validate-html-harder --settings=settings_postgrestest
|
./ietf/manage.py test --validate-html-harder --settings=settings_test
|
||||||
coverage xml
|
coverage xml
|
||||||
|
|
||||||
- name: Upload Coverage Results to Codecov
|
- name: Upload Coverage Results to Codecov
|
||||||
|
|
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
|
@ -48,7 +48,7 @@
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceFolder}/ietf/manage.py",
|
"${workspaceFolder}/ietf/manage.py",
|
||||||
"test",
|
"test",
|
||||||
"--settings=settings_postgrestest"
|
"--settings=settings_test"
|
||||||
],
|
],
|
||||||
"group": "test",
|
"group": "test",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
"args": [
|
"args": [
|
||||||
"${workspaceFolder}/ietf/manage.py",
|
"${workspaceFolder}/ietf/manage.py",
|
||||||
"test",
|
"test",
|
||||||
"--settings=settings_postgrestest",
|
"--settings=settings_test",
|
||||||
"--pattern=tests_js.py"
|
"--pattern=tests_js.py"
|
||||||
],
|
],
|
||||||
"group": "test",
|
"group": "test",
|
||||||
|
|
|
@ -83,7 +83,7 @@ If VS Code is not available to you, in your clone, type `cd docker; ./run`
|
||||||
|
|
||||||
Once the containers are started, run the tests to make sure your checkout is a good place to start from (all tests should pass - if any fail, ask for help at tools-develop@). Inside the app container's shell type:
|
Once the containers are started, run the tests to make sure your checkout is a good place to start from (all tests should pass - if any fail, ask for help at tools-develop@). Inside the app container's shell type:
|
||||||
```sh
|
```sh
|
||||||
ietf/manage.py test --settings=settings_postgrestest
|
ietf/manage.py test --settings=settings_test
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that we recently moved the datatracker onto PostgreSQL - you may still find older documentation that suggests testing with settings_sqlitetest. That will no longer work.
|
Note that we recently moved the datatracker onto PostgreSQL - you may still find older documentation that suggests testing with settings_sqlitetest. That will no longer work.
|
||||||
|
@ -228,7 +228,7 @@ before activating a new release.
|
||||||
|
|
||||||
From a datatracker container, run the command:
|
From a datatracker container, run the command:
|
||||||
```sh
|
```sh
|
||||||
./ietf/manage.py test --settings=settings_postgrestest
|
./ietf/manage.py test --settings=settings_test
|
||||||
```
|
```
|
||||||
|
|
||||||
> You can limit the run to specific tests using the `--pattern` argument.
|
> You can limit the run to specific tests using the `--pattern` argument.
|
||||||
|
|
|
@ -26,7 +26,7 @@ services:
|
||||||
# UID: 1001
|
# UID: 1001
|
||||||
# GID: 1001
|
# GID: 1001
|
||||||
# DATADIR: data
|
# DATADIR: data
|
||||||
# DJANGO_SETTINGS_MODULE: settings_postgrestest
|
# DJANGO_SETTINGS_MODULE: settings_test
|
||||||
|
|
||||||
# Uncomment the next line to use a non-root user for all processes.
|
# Uncomment the next line to use a non-root user for all processes.
|
||||||
# user: dev
|
# user: dev
|
||||||
|
|
|
@ -99,7 +99,7 @@ You can also open the datatracker project folder and click the **Reopen in conta
|
||||||
2. Wait for the containers to initialize. Upon completion, you will be dropped into a shell from which you can start the datatracker and execute related commands as usual, for example
|
2. Wait for the containers to initialize. Upon completion, you will be dropped into a shell from which you can start the datatracker and execute related commands as usual, for example
|
||||||
|
|
||||||
```
|
```
|
||||||
ietf/manage.py runserver 0.0.0.0:8001
|
ietf/manage.py runserver 8001
|
||||||
```
|
```
|
||||||
|
|
||||||
to start the datatracker.
|
to start the datatracker.
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<div>
|
<div>
|
||||||
<p>Is the datatracker server running?</p>
|
<p>Is the datatracker server running?</p>
|
||||||
<p class="mt">Using <strong>VS Code</strong>, open the <strong>Run and Debug</strong> tab on the left and click the <i>‣</i> symbol (Run Server) to start the server.</p>
|
<p class="mt">Using <strong>VS Code</strong>, open the <strong>Run and Debug</strong> tab on the left and click the <i>‣</i> symbol (Run Server) to start the server.</p>
|
||||||
<p>Otherwise, run the command <code>ietf/manage.py runserver 0.0.0.0:8001</code> from the terminal.</p>
|
<p>Otherwise, run the command <code>ietf/manage.py runserver 8001</code> from the terminal.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt">
|
<div class="mt">
|
||||||
<p>You can manage the database at <a href="/pgadmin">/pgadmin</a>.</p>
|
<p>You can manage the database at <a href="/pgadmin">/pgadmin</a>.</p>
|
||||||
|
|
|
@ -106,11 +106,11 @@ if [ -z "$EDITOR_VSCODE" ]; then
|
||||||
echo
|
echo
|
||||||
echo "You can execute arbitrary commands now, e.g.,"
|
echo "You can execute arbitrary commands now, e.g.,"
|
||||||
echo
|
echo
|
||||||
echo " ietf/manage.py runserver 0.0.0.0:8001"
|
echo " ietf/manage.py runserver 8001"
|
||||||
echo
|
echo
|
||||||
echo "to start a development instance of the Datatracker."
|
echo "to start a development instance of the Datatracker."
|
||||||
echo
|
echo
|
||||||
echo " ietf/manage.py test --settings=settings_postgrestest"
|
echo " ietf/manage.py test --settings=settings_test"
|
||||||
echo
|
echo
|
||||||
echo "to run all the python tests."
|
echo "to run all the python tests."
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Adding the extension to the default template is needed to allow the test-suite
|
# Adding the extension to the default template is needed to allow the test-suite
|
||||||
# to be run on postgres (see ietf.settings_postgrestest). The test runner always
|
# to be run on postgres (see ietf.settings_test). The test runner always
|
||||||
# makes a fresh test database instance, and since we are bypassing the migration
|
# makes a fresh test database instance, and since we are bypassing the migration
|
||||||
# framework and using a fixture to set the database structure, there's no reaonable
|
# framework and using a fixture to set the database structure, there's no reaonable
|
||||||
# way to install the extension as part of the test run.
|
# way to install the extension as part of the test run.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# useful for speeding up tests that depend on the test database, try
|
# useful for speeding up tests that depend on the test database, try
|
||||||
# for instance:
|
# for instance:
|
||||||
#
|
#
|
||||||
# ./manage.py test --settings=settings_postgrestest doc.ChangeStateTestCase
|
# ./manage.py test --settings=settings_test doc.ChangeStateTestCase
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import os
|
Loading…
Reference in a new issue