New test for postgresql pushmodel regression#1097
Open
4N0body5 wants to merge 2 commits into
Open
Conversation
Reviewer's GuideAdds a new Beakerlib regression test that validates push-model attestation succeeds when Keylime is configured to use PostgreSQL, ensuring evidence_items.agent_id is a full UUID and that no string truncation occurs (RHEL-189524). File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The use of fixed
sleepdelays (e.g.,sleep 3,sleep 5) after starting PostgreSQL and TPM-related services could be replaced with readiness checks to make the test more robust and less timing dependent. - The
sedmodification ofpg_hba.confassumes a specific existing line format; consider making this change more targeted or resilient (e.g., by matching exact fields or appending a dedicated entry) to avoid silent misconfiguration if the file changes. - Running
rm -rf /var/lib/pgsql/datainside the test is quite destructive; if possible, constrain the test to a dedicated instance or path to avoid impacting any pre-existing PostgreSQL data on shared or reused environments.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The use of fixed `sleep` delays (e.g., `sleep 3`, `sleep 5`) after starting PostgreSQL and TPM-related services could be replaced with readiness checks to make the test more robust and less timing dependent.
- The `sed` modification of `pg_hba.conf` assumes a specific existing line format; consider making this change more targeted or resilient (e.g., by matching exact fields or appending a dedicated entry) to avoid silent misconfiguration if the file changes.
- Running `rm -rf /var/lib/pgsql/data` inside the test is quite destructive; if possible, constrain the test to a dedicated instance or path to avoid impacting any pre-existing PostgreSQL data on shared or reused environments.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
kkaarreell
reviewed
Jul 21, 2026
kkaarreell
reviewed
Jul 21, 2026
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| # Include Beakerlib environment | ||
| . /usr/share/beakerlib/beakerlib.sh || exit 1 |
|
|
||
| rlRun -s "sudo -u postgres psql -c 'SELECT datname FROM pg_database;'" | ||
| rlAssertGrep "verifierdb" $rlRun_LOG | ||
| rlAssertGrep "registrardb" $rlRun_LOG |
4N0body5
force-pushed
the
nb-postgresql-pushmodel-regression
branch
from
July 21, 2026 15:05
bc91ee5 to
681d289
Compare
4N0body5
force-pushed
the
nb-postgresql-pushmodel-regression
branch
from
July 21, 2026 15:25
681d289 to
a9e20c7
Compare
kkaarreell
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Add a regression test ensuring Keylime push-model attestation succeeds when using a PostgreSQL backend and does not trigger agent ID truncation issues.
Tests: