forked from pulumi/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate test definitions from test execution so that providers can u…
…se the definitions in their tests (pulumi#1583) We'd like to test providers against the examples in this repository as part of their CI process, i.e., before they are released. In order to do that, this PR separates the test suite in misc/test into test definitions and test execution. The execution part then consists of a single test method instead of one per example, which looks like this: ```go for _, examples := range definitions.GetTestsForTag("azure") { for _, example := range examples { run(t, example) } } ``` Due to the use of subtests (`r.Run()`) the results are still cleanly reported and individual tests can be run. Providers can then `"github.com/pulumi/examples/misc/test/definitions"` and use a similar snippet to run the same tests, but with their own configuration to use local dependencies and SDKs. See pulumi/pulumi-azure-native#3065 for an example. There is a tag-based API to retrieve desired test definitions by programming language, provider, or both. This PR is limited to Azure and Azure Native so far. Other providers can be added as needed.
- Loading branch information
Showing
15 changed files
with
601 additions
and
433 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
Oops, something went wrong.