diff options
| author | Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com> | 2019-10-01 14:19:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-01 14:19:08 -0700 |
| commit | 85c4df9ba37eefeb02ab93cd09864d17d19bee39 (patch) | |
| tree | 486fe70d45620e4e07e4c0f5df46ff1551d8dc1a | |
| parent | c58280e63f19fe42dd744866165ccdaae3a88194 (diff) | |
| parent | 2aa77f1a77fede208da50053a50db3e02aaca0d8 (diff) | |
Merge pull request #4128 from ii/add-resource-usage-docs
Add resource usage docs
| -rw-r--r-- | contributors/devel/sig-testing/writing-good-e2e-tests.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contributors/devel/sig-testing/writing-good-e2e-tests.md b/contributors/devel/sig-testing/writing-good-e2e-tests.md index 836479c2..39727ea5 100644 --- a/contributors/devel/sig-testing/writing-good-e2e-tests.md +++ b/contributors/devel/sig-testing/writing-good-e2e-tests.md @@ -229,3 +229,18 @@ Unreachable nodes are evacuated and then repopulated upon rejoining [Disruptive] Note that opening issues for specific better tooling is welcome, and code implementing that tooling is even more welcome :-). +### Resource usage ### +When writing tests, resources used in the tests should be chosen specifically and sanely quanified. + +Therefore it is important to use resources that are: +1. appropriate to the test +2. inexpensive (containing little or no overhead) +3. create just as many an needed, no more +4. should be cleaned up at the end of the tests's run + +For example: +1. only using the resource type which is appropriate to the `test/e2e/<AREA>/<SPECIFIC_AREA>` +2. the resource type `ConfigMap` is inexpensive, common, and stateless. It should be used for such things as fetching created resources +3. although the clusters used for testing are generally beefy, an overamount of resources should not be created as it is unnecessary +4. using afterEach, make sure that your test destroys any resources leftover from the test + |
