Skip to content

[PG-1580] Add tests for pg_tde_change_key_provider #352

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

Conversation

AndersAstrand
Copy link
Collaborator

Also make it actually work and give correct usage instructions.

It seems like meson doesn't support subtests in TAP, otherwise these tests would have been so much nicer

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2025

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.90%. Comparing base (6c7bf88) to head (ff55f91).

❌ Your project status has failed because the head coverage (84.90%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           TDE_REL_17_STABLE     #352      +/-   ##
=====================================================
+ Coverage              80.49%   84.90%   +4.40%     
=====================================================
  Files                     22       22              
  Lines                   2605     2610       +5     
  Branches                 399      396       -3     
=====================================================
+ Hits                    2097     2216     +119     
+ Misses                   430      314     -116     
- Partials                  78       80       +2     
Components Coverage Δ
access 82.95% <ø> (ø)
catalog 88.00% <ø> (+0.45%) ⬆️
common 91.80% <ø> (ø)
encryption 75.47% <ø> (ø)
keyring 72.00% <ø> (ø)
src 91.40% <89.65%> (+24.66%) ⬆️
smgr 97.27% <ø> (-0.03%) ⬇️
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The configuration json generated by the pg_tde_change_key_provider CLI
tool was not valid since it contained an unexpected field.

Also include provider id in the record before attempting the
modification as otherwise the modify function throws an error.
The pg_tde_change_key_provider CLI tool usage information did not
contain information about how to update a global key provider.
This tool is only meant to be used in dire circumstances and whoever is
using it should be sure what they want to do.

Also remove information about "running postgres processes" from usage
information as the tool will refuse to do anything if the cluster is
running.
This seems to always have been incorrect.
This seems like the right thing to do.
Since there is precedent for using "normal" tap assertions for CLI
tools, they are also used here for easier debugging of test failures.
@AndersAstrand AndersAstrand force-pushed the tde/add-tests-for-pg_tde_change_key_provider branch from 4eba458 to ff55f91 Compare May 21, 2025 15:35
Copy link
Collaborator

@jeltz jeltz left a comment

Choose a reason for hiding this comment

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

Looks good except some weird whitespaces.

));
is($options->{token}, 'secret-token',
'token is set correctly for vault-v2 provider');
is( $options->{url},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this space a perl(un)tidy thing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes... i regret adding that to CI soooo much :D

@AndersAstrand AndersAstrand merged commit f419504 into percona:TDE_REL_17_STABLE May 22, 2025
27 checks passed
@AndersAstrand AndersAstrand deleted the tde/add-tests-for-pg_tde_change_key_provider branch May 22, 2025 13:33
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