Reduce boileplate in session protocol acceptance tests#21631
Merged
adfoster-r7 merged 1 commit intoJul 1, 2026
Merged
Conversation
|
Thanks for your pull request! As part of our landing process, we manually verify that all modules work as expected. We've added the |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors protocol session acceptance specs to remove duplicated console/test-harness boilerplate by introducing a shared RSpec context and updating multiple protocol acceptance specs to use it.
Changes:
- Added
protocol_session_acceptanceshared context containing console setup, test harness, and session/rhost test generation. - Updated SSH/SMB/Postgres/MySQL/MSSQL/LDAP acceptance specs to include the shared context and invoke
run_protocol_session_tests. - Normalized some string literals and added
# frozen_string_literal: trueto several acceptance spec files.
Impact Analysis:
- Blast radius: medium; affects all protocol acceptance specs migrated to the shared context (SSH/SMB/Postgres/MySQL/MSSQL/LDAP) and any future specs that adopt it.
- Data and contract effects: none; test-only refactor, but changes how acceptance test groups and hooks are generated/executed.
- Rollback and test focus: easy rollback (revert to per-spec boilerplate); focus validation on spec load/execution (ensuring
run_protocol_session_testsis callable) and Allure metadata/attachments generation across at least one protocol suite.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/support/acceptance/protocol_session_shared_context.rb | New shared context encapsulating console setup, harness, and generated protocol session tests. |
| spec/acceptance/ssh_spec.rb | Migrates SSH acceptance spec to shared context runner. |
| spec/acceptance/smb_spec.rb | Migrates SMB acceptance spec to shared context runner; minor string literal normalization. |
| spec/acceptance/postgres_spec.rb | Migrates Postgres acceptance spec to shared context runner; minor string/comment normalization. |
| spec/acceptance/mysql_spec.rb | Migrates MySQL acceptance spec to shared context runner; minor string literal normalization. |
| spec/acceptance/mssql_spec.rb | Migrates MSSQL acceptance spec to shared context runner; minor string literal normalization. |
| spec/acceptance/ldap_spec.rb | Migrates LDAP acceptance spec to shared context runner. |
131ac75 to
0b33e84
Compare
sjanusz-r7
approved these changes
Jul 1, 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.
Description
Reduce boilerplate in session protocol acceptance tests
Verification Steps