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

tests: Remove pytest assertion about exception #7850

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justin-stephenson
Copy link
Contributor

@justin-stephenson justin-stephenson commented Feb 24, 2025

I don't know why but previously this line below was raising a SSHAuthenticationError exception with a wrong password SSH attempt, and now it doesn't.

client.ssh("user1", "Wrong").connect()

This pytest raises assertion is not necessary for this test in my opinion however.

@ikerexxe
Copy link
Contributor

I don't think this is correct. According to connect documentation a SSHAuthenticationError exception should be raised if user fails to authenticate. Thus, it makes sense to keep checking for it to raise when an incorrect password has been input. I'd suggest checking whether the authentication has succeeded (sssd bug) or python ssh isn't behaving correctly (LibsshSessionException bug).

@danlavu
Copy link

danlavu commented Feb 25, 2025

I agree with @ikerexxe, we have to find out why the behavior changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants