Skip to content

Test the known hosts verifier log message#1721

Merged
MarkEWaite merged 2 commits intojenkinsci:masterfrom
MarkEWaite:check-known-hosts-message
Dec 21, 2025
Merged

Test the known hosts verifier log message#1721
MarkEWaite merged 2 commits intojenkinsci:masterfrom
MarkEWaite:check-known-hosts-message

Conversation

@MarkEWaite
Copy link
Contributor

Test the known hosts verifier log message

Improve test coverage of KnownHostsFileVerifier

Testing done

Confirmed that tests pass and the assertions are checked correctly.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@MarkEWaite MarkEWaite requested a review from a team as a code owner December 21, 2025 16:11
@MarkEWaite MarkEWaite added the test Automated test addition or improvement label Dec 21, 2025
@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 21, 2025
@MarkEWaite MarkEWaite removed the test Automated test addition or improvement label Dec 21, 2025
@MarkEWaite MarkEWaite merged commit 6c1b82a into jenkinsci:master Dec 21, 2025
18 checks passed
@MarkEWaite MarkEWaite deleted the check-known-hosts-message branch December 21, 2025 23:28
verifier.forCliGit(TaskListener.NULL).getVerifyHostKeyOption(null), is("-o StrictHostKeyChecking=yes"));
}

private static class LogHandler extends Handler {
Copy link

Choose a reason for hiding this comment

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

(haven't tried myself modifying the code here) perhaps the LogRecorder utility added in jenkins-test-harness (relatively recent) could have worked ?
example - https://github.com/jenkinsci/jenkins-test-harness/blob/master/src/test/java/org/jvnet/hudson/test/LogRecorderTest.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Automated test addition or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments