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] Property based Configure tests #2469

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Oct 9, 2024

Property based testing (using "pgregory.net/rapid") for PF's Configure call.

This includes:

  • Provider schema generation in pkg/pf/tests/util/property/pf/schema/provider
  • Provider value generation in pkg/pf/tests/util/property/pf/value/provider
  • Actual usage of the test in pkg/pf/tests/provider_configure_test.go

crosstests.Configure is strict by default, which we do not pass in the arbitrary case. The implementation in provider_configure_test.go includes an equality function that relaxes the assertion so it is passible. Each clause in the relax function is a potential bug that we can address.

@iwahbe iwahbe self-assigned this Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 1.21012% with 898 lines in your changes missing coverage. Please review.

Project coverage is 59.09%. Comparing base (0e0d2c4) to head (974b86e).

Files with missing lines Patch % Lines
...f/tests/util/property/pf/schema/provider/schema.go 0.00% 273 Missing ⚠️
.../pf/tests/util/property/pf/value/provider/value.go 0.00% 245 Missing ⚠️
...g/pf/tests/util/property/pf/value/provider/util.go 0.00% 228 Missing ⚠️
.../pf/tests/util/property/pf/schema/provider/attr.go 0.00% 55 Missing ⚠️
...tests/util/property/pf/value/provider/primitive.go 0.00% 40 Missing ⚠️
pkg/pf/tests/internal/cross-tests/util.go 2.85% 34 Missing ⚠️
pkg/pf/tests/internal/cross-tests/configure.go 23.07% 19 Missing and 1 partial ⚠️
pkg/tests/cross-tests/tfwrite.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2469      +/-   ##
==========================================
- Coverage   61.76%   59.09%   -2.67%     
==========================================
  Files         380      386       +6     
  Lines       51263    52144     +881     
==========================================
- Hits        31665    30817     -848     
- Misses      17783    19519    +1736     
+ Partials     1815     1808       -7     

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

@iwahbe iwahbe force-pushed the iwahbe/property-based-pf-types branch 11 times, most recently from 40db0a7 to a77c9b8 Compare October 16, 2024 17:11
@iwahbe iwahbe force-pushed the iwahbe/property-based-pf-types branch 8 times, most recently from e757705 to f4b7096 Compare October 17, 2024 13:00
@iwahbe iwahbe force-pushed the iwahbe/property-based-pf-types branch from f4b7096 to 974b86e Compare October 17, 2024 14:23
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.

1 participant