Merge pull request #828 from GSA/800-flask-command-for-test

800 flask command for test
This commit is contained in:
Carlo Costino
2024-03-05 11:58:00 -05:00
committed by GitHub
6 changed files with 271 additions and 83 deletions

View File

@@ -23,6 +23,7 @@
- [Migrations](#migrations)
- [Purging user data](#purging-user-data)
- [One-off tasks](#one-off-tasks)
- [Test Loading Commands](#commands-for-test-loading-the-local-dev-database)
- [How messages are queued and sent](#how-messages-are-queued-and-sent)
- [Writing public APIs](#writing-public-apis)
- [Overview](#overview)
@@ -527,6 +528,18 @@ cf run-task CLOUD-GOV-APP --command "flask command update-templates" --name YOUR
[Here's more documentation](https://docs.cloudfoundry.org/devguide/using-tasks.html) about Cloud Foundry tasks.
# Commands for test loading the local dev database
All commands use the `-g` or `--generate` to determine how many instances to load to the db. The `-g` or `--generate` option is required and will always defult to 1. An example: `flask command add-test-uses-to-db -g 6` will generate 6 random users and insert them into the db.
## Test commands list
- `add-test-organizations-to-db`
- `add-test-services-to-db`
- `add-test-jobs-to-db`
- `add-test-notifications-to-db`
- `add-test-users-to-db` (extra options include `-s` or `--state` and `-d` or `--admin`)
# How messages are queued and sent
There are several ways for notifications to come into the API.