-
Notifications
You must be signed in to change notification settings - Fork 19
[DO NOT MERGE] Add verifier registrar unreachable test scenario #928
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis pull request extends the test framework to support a new push-attestation agent and adds a functional test for the verifier/registrar unreachable scenario by enhancing the shared test helpers library, updating existing test scripts, adding systemd drop-in configurations for the new service, and introducing two new functional test suites. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Quote all variable expansions in lib.sh (e.g. ${__INTERNAL_limeTPMDetails}) to avoid word-splitting or globbing issues when paths contain spaces.
- The systemd drop-in creation for keylime_agent and keylime_push_model_agent is almost identical—consider looping or extracting a helper function to reduce duplication.
- The new push-attestation and unreachable-registrar test scripts share a lot of setup logic; think about moving common phases into test-helpers to simplify and DRY up the tests.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Quote all variable expansions in lib.sh (e.g. ${__INTERNAL_limeTPMDetails}) to avoid word-splitting or globbing issues when paths contain spaces.
- The systemd drop-in creation for keylime_agent and keylime_push_model_agent is almost identical—consider looping or extracting a helper function to reduce duplication.
- The new push-attestation and unreachable-registrar test scripts share a lot of setup logic; think about moving common phases into test-helpers to simplify and DRY up the tests.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
975b3c1 to
d24e0a2
Compare
| rlAssertGrep "ERROR - Agent $AGENT_ID does not exist on Registrar" $rlRun_LOG -E | ||
| rlRun "limeCreateTestPolicy" | ||
| #check agent status in logs | ||
| rlAssertGrep "Error.*Connection refused" $(limeAgentLogfile) |
Check warning
Code scanning / shellcheck
SC2046 Warning test
|
|
||
| rlPhaseStartTest "Stop verifier and check adding keylime agent" | ||
| rlRun -s "keylime_tenant -v 127.0.0.1 -t 127.0.0.1 -u $AGENT_ID --runtime-policy policy.json -c add ${TENANT_ARGS}" 1 | ||
| rlAssertGrep "Failed to establish a new connection.*Connection refused" $rlRun_LOG -E |
Check warning
Code scanning / shellcheck
SC2086 Warning test
| rlRun -s "keylime_tenant -v 127.0.0.1 -t 127.0.0.1 -u $AGENT_ID --runtime-policy policy.json -c add ${TENANT_ARGS}" 1 | ||
| rlAssertGrep "Failed to establish a new connection.*Connection refused" $rlRun_LOG -E | ||
| rlRun "limeWaitForAgentStatus $AGENT_ID 'Connection Refused'" 1 | ||
| rlAssertGrep "GET invoked from" $(limeAgentLogfile) |
Check warning
Code scanning / shellcheck
SC2046 Warning test
d24e0a2 to
aec78a5
Compare
8fb2ca2 to
ee371a1
Compare
88eba4e to
a9aa2b0
Compare
|
Reported possible bug: keylime/keylime#1819 |
Test scenario check how is agent behaved when verifier and registrar are unreachable during initial registration or attestation.
a9aa2b0 to
7145c22
Compare
Summary by Sourcery
Add support for the push attestation agent in test helpers, refactor tests for generic agent service invocation, and introduce new functional tests covering unreachable registrar/verifier and push-attestation scenarios
New Features:
Enhancements:
Tests: