Skip to content

Commit

Permalink
Add "Clean" to the Amazon System Test Contrib Guide (apache#26811)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferruzzi authored Oct 1, 2022
1 parent 91bc71d commit ed3ff9e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/system/providers/amazon/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ within the Amazon provider package.

* Keep it Self-Contained
* Keep it DAMP
* Keep it Clean
* Use the Helpers

## Keep it Self-Contained
Expand All @@ -62,6 +63,26 @@ checking for it in external locations. For example, if you create and break dow
S3 bucket, the bucket name should be defined in the file rather than setting it with
an environment variable.

## Keep it Clean

Code snippets in the system tests are embedded in the [documentation pages](
https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/operators/index.html).
In order to minimize confusion for new users looking at those doc pages, the code
snippets should be concise and not include parameters which are not needed for the
Operator to function. Any parameters which are not needed for the Operator but are
needed for the system test (`wait_for_completion` or `trigger_rule` as two examples)
should be added outside the snippet. For example:

```
# [START howto_operator_cloudformation_delete_stack]
delete_stack = CloudFormationDeleteStackOperator(
task_id='delete_stack',
stack_name=cloudformation_stack_name,
)
# [END howto_operator_cloudformation_delete_stack]
delete_stack.trigger_rule = TriggerRule.ALL_DONE
```

## Use the Helpers

Some helper methods for system tests have been provided in the [utils module](aws/utils/__init__.py).
Expand Down

0 comments on commit ed3ff9e

Please sign in to comment.