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

pulumiTest Integration tests #2052

Merged
merged 25 commits into from
Jun 7, 2024
Merged

Conversation

VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov commented Jun 3, 2024

This refactors the cross-tests to expose an integration test module pulCheck for use outside of cross-tests.

It allows us to easily write integration tests where we specify a TF schema, which gets bridged and use the pulumiTest framework for the test itself.

@VenelinMartinov VenelinMartinov changed the title Integration tests poc pulumiTest Integration tests Jun 3, 2024
@t0yv0
Copy link
Member

t0yv0 commented Jun 4, 2024

@VenelinMartinov
Copy link
Contributor Author

Yeah, absolutely, it's where I adapted this from.

I was wondering if we should abstract the part about bridging a TF provider and hooking it up to pulumiTest for wider use in the bridge.

@t0yv0
Copy link
Member

t0yv0 commented Jun 4, 2024

Yes, it would. We have a few ProgramTest tests but rebuilding the underlying provider is a bit of a hassle. But it would be really useful to have a quick stencil way to define a quick schema, program in one place and exercise it end to end, under Pulumi and/or TF, with debugging attached by default. Streamlining this would help contributors adding integration tests.

Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really helpful to me.

pkg/tests/cross-tests/pu_test.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 78.47222% with 31 lines in your changes missing coverage. Please review.

Project coverage is 61.27%. Comparing base (a167cca) to head (aa2be4b).
Report is 2 commits behind head on master.

Files Patch % Lines
pkg/tests/internal/pulcheck/pulcheck.go 81.31% 13 Missing and 4 partials ⚠️
pkg/tests/cross-tests/assert.go 27.77% 11 Missing and 2 partials ⚠️
pkg/tests/cross-tests/input_check.go 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2052      +/-   ##
==========================================
+ Coverage   61.20%   61.27%   +0.06%     
==========================================
  Files         337      339       +2     
  Lines       45177    45075     -102     
==========================================
- Hits        27651    27619      -32     
+ Misses      16005    15936      -69     
+ Partials     1521     1520       -1     

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

@VenelinMartinov VenelinMartinov requested a review from iwahbe June 6, 2024 12:10
@VenelinMartinov VenelinMartinov marked this pull request as ready for review June 6, 2024 12:10
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pkg/tests/cross-tests/defaults.go Outdated Show resolved Hide resolved
pkg/tests/pulcheck/pulcheck.go Outdated Show resolved Hide resolved
@VenelinMartinov VenelinMartinov enabled auto-merge (squash) June 7, 2024 16:38
@VenelinMartinov VenelinMartinov merged commit f5a6151 into master Jun 7, 2024
11 checks passed
@VenelinMartinov VenelinMartinov deleted the vvm/pulumiTest_integration_tests branch June 7, 2024 16:45
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.

3 participants