Skip to content
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

Remove bitbucket.org from host key verification tests #1224

Merged

Conversation

MarkEWaite
Copy link
Contributor

Replace bitbucket.org in host key verification test

Test host verifiers with a randomly selected ssh provider.

The bitbucket.org ssh provider is blocking access from the ci.jenkins.io agents. That causes tests to fail. Use other ssh providers.

Reduce the load on ssh providers by only testing one in ten times. Spread the load by using a randomly selected ssh provider instead of always using the same ssh provider.

Also includes other test improvements detected while fixing the failing tests.

  • Add mockito-core javaagent for future Java compatibility. Mockito javadoc warns that Java version 21 and later report a warning when trying to use Mockito without the javaagent. Followed the instructions in their documentation to add mockito javaagent.
  • Remove invalid Beanstalk URL from test
  • Remove test calls to isKubernetesCI() because the method always returns false

Testing done

Automated tests run locally on my computer. Rely on ci.jenkins.io for final verification that the failing tests are fixed.

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
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

No benefit to calling a method that always returns false.  The tests now
require a docker environment, so they cannot be run on a Kubernetes agent.
https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3
warns that Java version 21 and later report a warning when trying to
use Mockito without the javaagent. Followed the instructions in their
documentation to add mockito javaagent.
The bitbucket.org ssh provider seems to be blocking access from the
ci.jenkins.io agents.  That causes tests to fail. Use other ssh providers.

Reduce the load on ssh providers by only testing one in ten times.
Spread the load by using a randomly selected ssh provider instead of
always using the same ssh provider.
@MarkEWaite MarkEWaite requested a review from a team as a code owner December 6, 2024 04:44
@MarkEWaite MarkEWaite added the test Automated test addition or improvement label Dec 6, 2024
@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 6, 2024
@MarkEWaite MarkEWaite removed the tests Automated test addition or improvement label Dec 6, 2024
@MarkEWaite MarkEWaite merged commit 58b1b7b into jenkinsci:master Dec 6, 2024
18 checks passed
@MarkEWaite MarkEWaite deleted the remove-bitbucket-hostkey-check branch December 6, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant