Skip to content

Commit 74bdb6c

Browse files
committed
Update rest api config and docs
1 parent a96185f commit 74bdb6c

File tree

2 files changed

+16
-29
lines changed

2 files changed

+16
-29
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ Ensure that all `.env` files are saved in **UTF-8 format without BOM (Byte Order
286286
287287
1. **Load Initial Data**:
288288
289+
- Make sure you have `gzip` installed on your machine.
290+
289291
- Open a new terminal session and run the following command to populate the database with initial data from fixtures:
290292
291293
```bash
@@ -441,34 +443,6 @@ Follow these steps to setup your e2e testing environment:
441443

442444
**Please note that you only need to do these steps once.**
443445

444-
#### Updating e2e Test Data
445-
446-
If you need to update the e2e test data, follow these steps:
447-
448-
1. Delete the e2e db container from `Docker Desktop Dashboard` or with the following command:
449-
450-
```bash
451-
docker rm -f e2e-nest-db
452-
```
453-
454-
2. Delete the e2e db volume from `Docker Desktop Dashboard` or with the following command:
455-
456-
```bash
457-
docker volume rm nest-e2e_e2e-db-data
458-
```
459-
460-
3. Re-run the e2e backend instance with the following command:
461-
462-
```bash
463-
make run-backend-e2e
464-
```
465-
466-
4. Load the updated data into the e2e db with the following command (in another terminal session):
467-
468-
```bash
469-
make load-data-e2e
470-
```
471-
472446
### Test Coverage
473447

474448
- There is a **minimum test coverage requirement** for the **backend** code -- see [pyproject.toml](https://github.com/OWASP/Nest/blob/main/backend/pyproject.toml).

backend/apps/api/rest/v0/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747

4848
api_settings_customization = {}
49-
if settings.IS_LOCAL_ENVIRONMENT or settings.IS_E2E_ENVIRONMENT:
49+
if settings.IS_LOCAL_ENVIRONMENT:
5050
api_settings_customization = {
5151
"auth": None,
5252
"servers": [
@@ -57,6 +57,19 @@
5757
],
5858
"throttle": [],
5959
}
60+
61+
elif settings.IS_E2E_ENVIRONMENT:
62+
api_settings_customization = {
63+
"auth": None,
64+
"servers": [
65+
{
66+
"description": "E2E",
67+
"url": settings.SITE_URL,
68+
}
69+
],
70+
"throttle": [],
71+
}
72+
6073
elif settings.IS_STAGING_ENVIRONMENT:
6174
api_settings_customization = {
6275
"servers": [

0 commit comments

Comments
 (0)