-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Test] Support SSH keys from environment variables in SshUrlNoOauthPatFactory E2E test #23634
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
Conversation
| await userPreferences.addSshKeysFromStrings(privateSshKey, publicSshKey); | ||
| } else { | ||
| Logger.info('Using SSH keys from file paths'); | ||
| await userPreferences.addSshKeys(privateSshKeyPath, publicSshKeyPath); |
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.
I would suggest renaming userPreferences.addSshKeys() to userPreferences.uploadSshKeys() to make the difference with userPreferences.addSshKeysFromStrings() obvious.
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.
userPreferences already has uploadSshKeys() that used in addSshKeys()
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.
What do you think about addSshKeysFromFiles()?
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.
addSshKeysFromFiles() sounds good as well to me
Thank you!
dmytro-ndp
left a comment
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.
Looks good to merge, with a minor non-critical notice.
What does this PR do?
Support SSH keys from environment variables in SshUrlNoOauthPatFactory E2E test:
addSshKeysFromStrings()method toUserPreferencespage object for direct SSH key string inputTS_SELENIUM_SSH_PRIVATE_KEYandTS_SELENIUM_SSH_PUBLIC_KEYconstants toFACTORY_TEST_CONSTANTSSshUrlNoOauthPatFactorytest to support dual-mode SSH key loading:Screenshot/screencast of this PR
What issues does this PR fix or reference?
This PR is part of https://issues.redhat.com/browse/CRW-5392
How to test this PR?
To test with environment variables set
TS_SELENIUM_SSH_PRIVATE_KEYandTS_SELENIUM_SSH_PUBLIC_KEYTo test with file paths set
TS_SELENIUM_SSH_PRIVATE_KEY_PATHandTS_SELENIUM_SSH_PUBLIC_KEY_PATHPR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or referenceandHow to test this PRcompletedReviewers
Reviewers, please comment how you tested the PR when approving it.