Skip to content
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

PF integration tests using pulumitest #2186

Merged
merged 6 commits into from
Jul 22, 2024
Merged

Conversation

VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov commented Jul 16, 2024

This adds some utility functions which allow simple integration testing in the PF bridge, similar to the tests in pkg:

func TestUnknownHandling(t *testing.T) {

Builds on pulumitest, the providerbuilder tools and the pulcheck code under pkg originally adapted from the cross tests.

Allows integration tests to be written against PF, where the schema and the yaml program are specified concisely in the test and pulumitest is used for the actions which allows quite a bit of freedom in expressing pulumi operations.

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 64.51613% with 22 lines in your changes missing coverage. Please review.

Project coverage is 59.84%. Comparing base (59ab72c) to head (249a1fd).

Files Patch % Lines
pf/tests/util.go 64.51% 20 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2186      +/-   ##
==========================================
- Coverage   60.61%   59.84%   -0.77%     
==========================================
  Files         356      356              
  Lines       46368    46311      -57     
==========================================
- Hits        28104    27715     -389     
- Misses      16706    17042     +336     
+ Partials     1558     1554       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VenelinMartinov VenelinMartinov marked this pull request as ready for review July 16, 2024 15:24
@VenelinMartinov VenelinMartinov changed the title PF integration tests PF integration tests using pulumitest Jul 16, 2024
pf/tests/util.go Outdated Show resolved Hide resolved
@VenelinMartinov VenelinMartinov merged commit c57aebd into master Jul 22, 2024
11 checks passed
@VenelinMartinov VenelinMartinov deleted the vvm/pf_integration_tests branch July 22, 2024 09:06
VenelinMartinov added a commit that referenced this pull request Jul 23, 2024
This adds a few additions to the PF test utils:

- Adds an option to buildprovider for tests to provide an import
function
- Adds `UseStateForUnknown` planmodifier to the id property in Create,
as that seems to be used almost universally in pf providers in the
`bridgedProvider` util
- Adds a default Update implementation in the `bridgedProvider` util

Stacked on #2186
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v3.88.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants