Unit tests and documentation

This commit is contained in:
zandercymatics 2025-01-06 13:39:56 -07:00
parent 9052d9ed3f
commit 188c99a169
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 117 additions and 12 deletions

View file

@ -918,3 +918,36 @@ Example (only requests): `./manage.py create_federal_portfolio --branch "executi
- Parameters #1-#2: Either `--agency_name` or `--branch` must be specified. Not both.
- Parameters #2-#3, you cannot use `--both` while using these. You must specify either `--parse_requests` or `--parse_domains` seperately. While all of these parameters are optional in that you do not need to specify all of them,
you must specify at least one to run this script.
## Populate requested suborg
This script populates the "requested suborganization" fields on DomainRequest.
These fields are: requested_suborganization, suborganization_city, suborganization_state_territory.
This is done by pulling from organization_name, city, and state_territory.
The script will only parse records with a portfolio but no suborganization attached to it.
### Running on sandboxes
#### Step 1: Login to CloudFoundry
```cf login -a api.fr.cloud.gov --sso```
#### Step 2: SSH into your environment
```cf ssh getgov-{space}```
Example: `cf ssh getgov-za`
#### Step 3: Create a shell instance
```/tmp/lifecycle/shell```
#### Step 4: Upload your csv to the desired sandbox
[Follow these steps](#use-scp-to-transfer-data-to-sandboxes) to upload the federal_cio csv to a sandbox of your choice.
#### Step 5: Running the script
To create a specific portfolio:
```./manage.py populate_requested_suborg```
### Running locally
#### Step 1: Running the script
```docker-compose exec app ./manage.py populate_requested_suborg```