-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from domain-protect/doc-updates
Documentation updates
- Loading branch information
Showing
6 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Integration Tests - Deployment | ||
|
||
[Integration Tests](../docs/integration-tests.md) have been implemented to provide comprehensive end-to-end pipeline tests to ensure we can be confident as to whether an update has affected the system functionality. | ||
|
||
This page details the process for developing and testing deployment integration tests. | ||
|
||
## Create integration test role in Route53 test account | ||
|
||
* Create an IAM role in the Route53 test account | ||
* Add a trust policy for the Security Audit account, optionally with an External ID | ||
* Add this policy,replacing the example with your Hosted Zone ID | ||
``` | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "Route53write", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ChangeResourceRecordSets" | ||
], | ||
"Resource": "arn:aws:route53:::hostedzone/ZZZZ12345678ZZ" | ||
}, | ||
{ | ||
"Sid": "Route53Read", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"route53:ListHostedZonesByName" | ||
], | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Configure development environment | ||
|
||
* create virtual environment | ||
```bash | ||
python -m venv .venv | ||
``` | ||
* activate virtual environment | ||
```bash | ||
source .venv/bin/activate | ||
``` | ||
* install dependencies | ||
```powershell | ||
pip install -r requirements-tests.txt | ||
``` | ||
* set environment variables for dev environment, e.g. | ||
```bash | ||
export PROJECT=domain-protect | ||
export ENVIRONMENT=dev | ||
export ROUTE53_ACCOUNT="12345678901" | ||
export TEST_ROLE_NAME="domain-protect-integration-test" | ||
export ZONE_NAME="example.com" | ||
export ZONE_ID="ZZZZ12345678ZZ" | ||
export TEST_ROLE_EXTERNAL_ID="xxxxxxxxxxxxxxxxxx" | ||
export AWS_REGION="eu-west-1" | ||
export CLOUDFLARE_ZONE_NAME="example.net" | ||
``` | ||
* copy and paste AWS macOS / Linux CLI variables for the security audit account to terminal | ||
|
||
* test integration locally | ||
```python | ||
pytest -v integration_tests/deployment | ||
``` |