Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lantoli committed Apr 11, 2024
1 parent d1870b4 commit da20a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contributing/testing-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
- Run the tests in serial (`resource.Test` instead of `resource.ParallelTest`) if the tests are fast and saving resources is prefered.
- Don’t use `ProjectIDExecution` and create a project for each test if a faster test execution is prefered even if more resources are needed.
- Main way to reduce use of clusters is `ClusterNameExecution`. This function returns the name of a cluster that is created for the current execution of tests for a resource. Similar precautions to project reuse must be taken here. If a global resource to cluster is being tested (e.g. cluster global config) then it's prefered to run tests in serial or create their own clusters.
- Plural data sources can be challeging to test when tests run in parallel or they share projects and/or clusters. In that case:
- Plural data sources can be challenging to test when tests run in parallel or they share projects and/or clusters. In that case:
- Don't check for a specific total count as other tests can also create resources. As an example you can check that there are results using `acc.IntGreatThan(0)`.
- Don't assume results are in a certain order, use functions like `resource.TestCheckTypeSetElemNestedAttrs` or `resource.TestCheckTypeSetElemAttr`.

Expand Down

0 comments on commit da20a1f

Please sign in to comment.