-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate test definitions from test execution so that providers can use the definitions in their tests #1583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all seems reasonable to me assuming docs team agrees.
c7f4a43
to
3d57974
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the PR tests are "passing", but I see this in the logs:
sorry, accidentally edited - thomas11
Is this expected?
No, sorry for the breakage. Fixed now. |
Looking at the list of tests, it looks like this job (which runs the Azure TS tests) didn't find any tests to run: https://github.com/pulumi/examples/actions/runs/7919098169/job/21619086583?pr=1583
However we do have Azure TS tests, as this PR shows: https://github.com/pulumi/examples/actions/runs/7626653760/job/20773536499?pr=1565
Is there something else that needs to be done to ensure this repo continues to run all of the tests it's currently running? |
3aa6b54
to
0a3442d
Compare
That was another bug, apologies. Fixed. I've now gone over the PR again, re-organized and cleaned it up a bunch. |
0a3442d
to
2add92e
Compare
2add92e
to
9f1d92c
Compare
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:
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.