Skip to content

Conversation

@SkorikSergey
Copy link
Contributor

@SkorikSergey SkorikSergey commented Nov 7, 2025

What does this PR do?

Automate "SSH key with passphrase configuration from the User Dashboard" test-case

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-5392

How to test this PR?

To test this PR:

  • set TS_SELENIUM_SSH_PRIVATE_KEY and TS_SELENIUM_SSH_PUBLIC_KEY
  • also passphrase by TS_SELENIUM_SSH_PASSPHRASE
  • set TS_SELENIUM_FACTORY_GIT_REPO_URL for repo url
  • start SshUrlNoOauthPatFactory e2e test

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

ssh.txt
ssh_bitbucket.txt
ssh_with_passphrase.txt

@SkorikSergey SkorikSergey self-assigned this Nov 7, 2025
@SkorikSergey SkorikSergey added area/qe status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Nov 7, 2025
@SkorikSergey SkorikSergey marked this pull request as ready for review November 7, 2025 14:37
'ssh://git@bitbucket-ssh.apps.ds-airgap2-v15.crw-qe.com/~admin/private-bb-repo.git';
const privateSshKey: string = FACTORY_TEST_CONSTANTS.TS_SELENIUM_SSH_PRIVATE_KEY;
const publicSshKey: string = FACTORY_TEST_CONSTANTS.TS_SELENIUM_SSH_PUBLIC_KEY;
const sshPassphrase: string = FACTORY_TEST_CONSTANTS.TS_SELENIUM_SSH_PASSPHRASE;
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct name is TS_SELENIUM_SSH_KEY_PASSPHRASE.

TS_SELENIUM_SSH_PUBLIC_KEY: process.env.TS_SELENIUM_SSH_PUBLIC_KEY || '',

/**
* ssh passphrase as string (from environment variable)
Copy link
Contributor

Choose a reason for hiding this comment

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

it would better to say "ssh key passphrase" to avoid confusion

/**
* ssh passphrase as string (from environment variable)
*/
TS_SELENIUM_SSH_PASSPHRASE: process.env.TS_SELENIUM_SSH_PASSPHRASE || '',
Copy link
Contributor

Choose a reason for hiding this comment

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

correct name is TS_SELENIUM_SSH_KEY_PASSPHRASE

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 7, 2025

@SkorikSergey: thank you for test automation!

It's also important to ensure in the test that push inside the workspace without personal access token using either terminal or source control view works without asking for the passphrase.
There was a problem with it in the past: eclipse-che/che-dashboard#1157 (comment)

See an example of push verification in the test https://github.com/eclipse-che/che/blob/main/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts#L192-L251

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 11, 2025

@SkorikSergey: thank you for pointing out the fact that SshUrlNoOauthPatFactory will fail if adding https://github.com/eclipse-che/che/blob/main/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts#L140-L154 steps into it without adding Data.txt file to the test repo:

Please add Data.txt file to those repos as well.

@SkorikSergey SkorikSergey added status/in-progress This issue has been taken by an engineer and is under active development. and removed status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Nov 17, 2025
@SkorikSergey SkorikSergey force-pushed the useSshPassphraseInSshUrlNoOauthPatFactoryTest branch from ae64a6f to 1675857 Compare December 10, 2025 13:47
@dmytro-ndp
Copy link
Contributor

@SkorikSergey : thank you for the test improvement! The changes commonly look good.
Do you have new test results to review?

@artaleks9
Copy link
Contributor

The code looks good.
Yes, interesting to see results of run the test with the last changes.

@SkorikSergey
Copy link
Contributor Author

@SkorikSergey : thank you for the test improvement! The changes commonly look good. Do you have new test results to review?

Added 3 text files with test result. Two for github repository and bitbucket(default for this test).

@dmytro-ndp
Copy link
Contributor

@SkorikSergey : thank you for sharing the test run logs.

I found a commit message mismatch in the logs and repo.
In repo there is no "Commit" prefix in the commit message, while ssh_with_passphrase.txt log contains it:

▼ SourceControlView.typeCommitMessage - Type commit text: "Commit 1765382240250"

Could you please take a look?

@SkorikSergey
Copy link
Contributor Author

SkorikSergey commented Dec 10, 2025

@SkorikSergey : thank you for sharing the test run logs.

I found a commit message mismatch in the logs and repo. In repo there is no "Commit" prefix in the commit message, while ssh_with_passphrase.txt log contains it:

▼ SourceControlView.typeCommitMessage - Type commit text: "Commit 1765382240250"

Could you please take a look?

Thank you for attention. Commit prefix really not exist in commit message in this test and NoSetupRepoFactory for which I copy-pasted :). I will add prefix to message.

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

PR looks good to merge, IMHO

@SkorikSergey : thank you for test automation!

@SkorikSergey SkorikSergey merged commit 715b209 into main Dec 10, 2025
6 checks passed
@SkorikSergey SkorikSergey deleted the useSshPassphraseInSshUrlNoOauthPatFactoryTest branch December 10, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/qe status/in-progress This issue has been taken by an engineer and is under active development.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants