You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this will also need a clean, standard way to inject secrets for connectors, user passwords, 3rd party test systems, etc.
We've built several versions of these kinds of scripts, but have never invested enough time & energy to making them maintainable. One of the main reasons is that we've not built automated tests that rely on the scripts enough to force them to keep working and stay up to date. For some examples, see:
These scripts will be used for at least three purposes over time:
Setting up a local environment with test data for engineers & product managers to test features
Setting up a staging environment with test data for automated CI checks to test features
Setting up a hosted environment with test data for giving product & sales demos
Because of this, it's important to make these scripts as portable as possible; ideally, these are relatively vanilla Python scripts that just leverage Fides CLI & API commands without calling source code functions at all.
Acceptance Criteria
Test Setup Scripts Framework
MUST save setup scripts in a directory structure that is easy to intuit and maintain, e.g. scripts/setup/systems.py, scripts/setup/postgres_connector.py, or similar
MUST have a nox -s setup_test (or similar name!) that runs all "basic" scripts to fully configure the local Fides database
MUST NOT rely on pytest features or functionality; these scripts are intended to be reused in the future for E2E runners (e.g. Cypress) and deployed environments without pytest
MUST inject secrets using ENV variables for reusability (NOTE: within nox, these ENV vars could be auto-populated by Vault)
Basic Test Setup Scripts
To get our local environment populated with enough "basic" data to test our core features, we MUST have scripts that:
configure a "Fides API client" with OAuth token to test protected APIs
configure Users to test the Admin UI
configure Systems to test the data map
configure Datasets to test the data map
configure custom Data Categories, Data Uses, and Data Subjects to test the data map
configure an S3 Storage location to test privacy requests
configure a Mailgun email to test privacy requests
configure identity verification for the privacy center to test privacy requests
configure DSR access & erasure policies to test privacy requests
configure a Postgres connector (and dataset) to test privacy requests (using existing integration test scripts for Postgres)
configure a Mongodb connector (and dataset) to test privacy requests (using existing integration test scripts for Mongodb)
configure a Mailchimp connector (and dataset) to test privacy requests (using existing integration test scripts for Mailchimp)
configure a Stripe connector (and dataset) to test privacy requests (using existing integration test scripts for Stripe)
configure privacy requests in various statuses
Manual Testing
Once all basic setup scripts have run, a tester should be able to:
Login to the Admin UI as a User and view existing Users in User Management UI
View existing Systems, Datasets, and custom Taxonomy resources in their respective screens
View existing Privacy Requests and Connectors in their respective screens
Submit and execute a new privacy request via the Privacy Center & Admin UI
The text was updated successfully, but these errors were encountered:
* exclude secrets file
* initial setup utils for demo scripts
* add keys for access and erasure policies
* method to create a policy
* method to create privacy request
* method to verify subject identity
* allow user to specify custom scopes on the oauth client
* consolidate database connector creation code, add mongodb
* tweak method names for consistency, add example script
* fix relative imports, remove fidesops references in favour of fides
* update last remaining ref
* Stripe connector setup script (#1391)
* Add login check to `user.py`
* Update oauth client details
* Update `.gitignore`
* Add stripe connector script
* Update nox lints
* Run isort on scripts
* PR feedback
* Update S3 secrets import
* Fix a few small errors
* Fix issue with create s3 storage config
* Fix issue with create s3 storage config
* Add `create_rule` and `create_rule_target`
* Fix broken test and update other related files
* add x86_64 to docker platforms
* add nox command to run scripts
* Run isort
* Move `configure_s3_storage` call higher up.
This was moved higher up because the `create_rule` function assumes the storage config has already created.
* standardise s3 creation name
* add basic guide for config script usage
* pass posargs into run_script cmd
* add secrets management through env vars falling back to secrets.py
* remove pdf and raise exception
* run isort
* rename script, fix startup issues and add a faster secrets check
* add the utility scripts docs to mkdocs.yaml so its visible
* add breadcrumbs about where the secrets file migh be located
* update error message
* update a user message
Co-authored-by: Andrew Jackson <[email protected]>
Co-authored-by: Thomas <[email protected]>
Description
Create a default set of “test setup scripts” that configure a Fides instance with enough data to exercise all core features, including:
Note that this will also need a clean, standard way to inject secrets for connectors, user passwords, 3rd party test systems, etc.
We've built several versions of these kinds of scripts, but have never invested enough time & energy to making them maintainable. One of the main reasons is that we've not built automated tests that rely on the scripts enough to force them to keep working and stay up to date. For some examples, see:
fidesdemo
repo: https://github.com/ethyca/fidesdemo/blob/main/flaskr/fidesops.pyfidesops
quickstart: https://github.com/ethyca/fides/blob/main/scripts/quickstart.pyseed_test_data
command: https://github.com/ethyca/fides/blob/main/scripts/create_test_data.pyThese scripts will be used for at least three purposes over time:
Because of this, it's important to make these scripts as portable as possible; ideally, these are relatively vanilla Python scripts that just leverage Fides CLI & API commands without calling source code functions at all.
Acceptance Criteria
Test Setup Scripts Framework
scripts/setup/systems.py
,scripts/setup/postgres_connector.py
, or similarnox -s setup_test
(or similar name!) that runs all "basic" scripts to fully configure the local Fides databasepytest
features or functionality; these scripts are intended to be reused in the future for E2E runners (e.g. Cypress) and deployed environments without pytestnox
, these ENV vars could be auto-populated by Vault)Basic Test Setup Scripts
To get our local environment populated with enough "basic" data to test our core features, we MUST have scripts that:
Manual Testing
Once all basic setup scripts have run, a tester should be able to:
The text was updated successfully, but these errors were encountered: