Skip to content

Add 'AnsibleDevFileAPI' E2E test #23456

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

Merged
merged 7 commits into from
Jun 12, 2025
Merged

Add 'AnsibleDevFileAPI' E2E test #23456

merged 7 commits into from
Jun 12, 2025

Conversation

artaleks9
Copy link
Contributor

@artaleks9 artaleks9 commented Jun 10, 2025

What does this PR do?

  • Adds 'AnsibleDevFileAPI E2E test to api set tests
  • Adds methods to /tests/e2e/utils/KubernetesCommandLineToolsExecutor.ts pageobject

Screenshot/screencast of this PR

[ashmaraiev@fedora e2e]$ npm run prettier

> @eclipse-che/[email protected] prettier
> prettier --config .prettierrc.json . --write

.eslintrc.js 71ms (unchanged)
.prettierrc.json 2ms (unchanged)
CODE_STYLE.md 64ms (unchanged)
configs/inversify.config.ts 107ms (unchanged)
configs/inversify.types.ts 15ms (unchanged)
configs/mocharc.ts 14ms (unchanged)
configs/reporters.config.js 11ms (unchanged)
constants/API_TEST_CONSTANTS.ts 15ms (unchanged)
constants/BASE_TEST_CONSTANTS.ts 20ms (unchanged)
constants/CHROME_DRIVER_CONSTANTS.ts 10ms (unchanged)
constants/FACTORY_TEST_CONSTANTS.ts 9ms (unchanged)
constants/MOCHA_CONSTANTS.ts 5ms (unchanged)
constants/MONACO_CONSTANTS.ts 3ms (unchanged)
constants/OAUTH_CONSTANTS.ts 7ms (unchanged)
constants/PLUGIN_TEST_CONSTANTS.ts 3ms (unchanged)
constants/REPORTER_CONSTANTS.ts 17ms (unchanged)
constants/TIMEOUT_CONSTANTS.ts 13ms (unchanged)
driver/ChromeDriver.ts 19ms (unchanged)
driver/IDriver.ts 4ms (unchanged)
package-lock.json 115ms (unchanged)
package.json 3ms (unchanged)
pageobjects/dashboard/CreateWorkspace.ts 29ms (unchanged)
pageobjects/dashboard/Dashboard.ts 40ms (unchanged)
pageobjects/dashboard/TrustAuthorPopup.ts 7ms (unchanged)
pageobjects/dashboard/UserPreferences.ts 40ms (unchanged)
pageobjects/dashboard/workspace-details/WorkspaceDetails.ts 31ms (unchanged)
pageobjects/dashboard/Workspaces.ts 50ms (unchanged)
pageobjects/git-providers/OauthPage.ts 26ms (unchanged)
pageobjects/ide/CheCodeLocatorLoader.ts 13ms (unchanged)
pageobjects/ide/RestrictedModeButton.ts 3ms (unchanged)
pageobjects/ide/ViewsMoreActionsButton.ts 6ms (unchanged)
pageobjects/login/interfaces/ICheLoginPage.ts 2ms (unchanged)
pageobjects/login/interfaces/IOcpLoginPage.ts 2ms (unchanged)
pageobjects/login/kubernetes/DexLoginPage.ts 8ms (unchanged)
pageobjects/login/kubernetes/KubernetesLoginPage.ts 4ms (unchanged)
pageobjects/login/openshift/OcpLoginPage.ts 12ms (unchanged)
pageobjects/login/openshift/OcpRedHatLoginPage.ts 7ms (unchanged)
pageobjects/login/openshift/OcpUserLoginPage.ts 5ms (unchanged)
pageobjects/login/openshift/RedHatLoginPage.ts 9ms (unchanged)
pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts 9ms (unchanged)
pageobjects/openshift/OcpApplicationPage.ts 7ms (unchanged)
pageobjects/openshift/OcpImportFromGitPage.ts 10ms (unchanged)
pageobjects/openshift/OcpMainPage.ts 15ms (unchanged)
pageobjects/webterminal/WebTerminalPage.ts 24ms (unchanged)
README.md 29ms (unchanged)
specs/api/AnsibleDevFileAPI.spec.ts 69ms (unchanged)
specs/api/BuildPushRunPodmanContainerAPI.spec.ts 31ms (unchanged)
specs/api/ContainerOverridesAPI.spec.ts 8ms (unchanged)
specs/api/CppDevFileAPI.spec.ts 22ms (unchanged)
specs/api/DevfileAcceptanceTestAPI.spec.ts 25ms (unchanged)
specs/api/DotnetDevFileAPI.spec.ts 23ms (unchanged)
specs/api/EmptyWorkspaceAPI.spec.ts 13ms (unchanged)
specs/api/GoDevFileAPI.spec.ts 19ms (unchanged)
specs/api/InbuiltApplicationDevWorkspacesAPI.spec.ts 29ms (unchanged)
specs/api/JBossEapDevFileAPI.spec.ts 25ms (unchanged)
specs/api/LombokDevFileAPI.spec.ts 16ms (unchanged)
specs/api/NodeJsExpressDevFileAPI.spec.ts 36ms (unchanged)
specs/api/NodeJSMongoDBDevFileAPI.spec.ts 26ms (unchanged)
specs/api/PhpDevFileAPI.spec.ts 14ms (unchanged)
specs/api/PodOverridesAPI.spec.ts 9ms (unchanged)
specs/api/PythonDevFileAPI.spec.ts 14ms (unchanged)
specs/api/QuarkusDevFileAPI.spec.ts 16ms (unchanged)
specs/dashboard-samples/Documentation.spec.ts 28ms (unchanged)
specs/dashboard-samples/EmptyWorkspace.spec.ts 12ms (unchanged)
specs/dashboard-samples/Quarkus.spec.ts 9ms (unchanged)
specs/dashboard-samples/RecommendedExtensions.spec.ts 74ms (unchanged)
specs/devconsole-intergration/DevConsoleIntegration.spec.ts 15ms (unchanged)
specs/factory/Factory.spec.ts 41ms (unchanged)
specs/factory/FactoryWithGitRepoOptions.spec.ts 12ms (unchanged)
specs/factory/NoSetupRepoFactory.spec.ts 40ms (unchanged)
specs/factory/RefusedOAuthFactory.spec.ts 39ms (unchanged)
specs/miscellaneous/CreateWorkspaceWithExistedName.spec.ts 15ms (unchanged)
specs/miscellaneous/CustomOpenVSXRegistry.spec.ts 39ms (unchanged)
specs/miscellaneous/KubedockPodmanTest.spec.ts 14ms (unchanged)
specs/miscellaneous/PredefinedNamespace.spec.ts 11ms (unchanged)
specs/miscellaneous/RevokeOauth.spec.ts 4ms (unchanged)
specs/miscellaneous/UserPreferencesTest.spec.ts 7ms (unchanged)
specs/miscellaneous/UserSecretsInWorkspace.spec.ts 10ms (unchanged)
specs/miscellaneous/WorkspaceIdleTimeout.spec.ts 12ms (unchanged)
specs/miscellaneous/WorkspaceRunTimeout.spec.ts 16ms (unchanged)
specs/miscellaneous/WorkspaceWithParent.spec.ts 21ms (unchanged)
specs/MochaHooks.ts 16ms (unchanged)
specs/SmokeTest.spec.ts 12ms (unchanged)
specs/web-terminal/WebTerminalTest.spec.ts 10ms (unchanged)
specs/web-terminal/WebTerminalUnderAdmin.spec.ts 12ms (unchanged)
specs/web-terminal/WebTerminalUnderRegularUser.spec.ts 8ms (unchanged)
suites/devfile-acceptance-test-suite/DynamicallyGeneratingAPITest.suite.ts 2ms (unchanged)
suites/disconnected-ocp/APITest.suite.ts 3ms (unchanged)
suites/disconnected-ocp/DynamicallyGeneratingAPITest.suite.ts 2ms (unchanged)
suites/disconnected-ocp/UITest.suite.ts 2ms (unchanged)
suites/online-ocp/APITest.suite.ts 2ms (unchanged)
suites/online-ocp/DynamicallyGeneratingAPITest.suite.ts 1ms (unchanged)
suites/online-ocp/UITest.suite.ts 1ms (unchanged)
tests-library/LoginTests.ts 6ms (unchanged)
tests-library/ProjectAndFileTests.ts 15ms (unchanged)
tests-library/WorkspaceHandlingTests.ts 20ms (unchanged)
tsconfig.json 1ms (unchanged)
utils/BrowserTabsUtil.ts 13ms (unchanged)
utils/CheReporter.ts 34ms (unchanged)
utils/DevfilesHelper.ts 30ms (unchanged)
utils/DevWorkspaceConfigurationHelper.ts 17ms (unchanged)
utils/DriverHelper.ts 99ms (unchanged)
utils/IContextParams.ts 5ms (unchanged)
utils/IKubernetesCommandLineToolsExecutor.ts 4ms (unchanged)
utils/KubernetesCommandLineToolsExecutor.ts 50ms (unchanged)
utils/Logger.ts 18ms (unchanged)
utils/request-handlers/CheApiRequestHandler.ts 11ms (unchanged)
utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts 7ms (unchanged)
utils/request-handlers/headers/IAuthorizationHeaderHandler.ts 2ms (unchanged)
utils/ScreenCatcher.ts 11ms (unchanged)
utils/ShellExecutor.ts 5ms (unchanged)
utils/StringUtil.ts 7ms (unchanged)
utils/workspace/ApiUrlResolver.ts 5ms (unchanged)
utils/workspace/ITestWorkspaceUtil.ts 4ms (unchanged)
utils/workspace/TestWorkspaceUtil.ts 30ms (unchanged)
utils/workspace/WorkspaceStatus.ts 1ms (unchanged)

[ashmaraiev@fedora e2e]$ npm run lint

> @eclipse-che/[email protected] lint
> eslint --fix .

[ashmaraiev@fedora e2e]$ 

What issues does this PR fix or reference?

How to test this PR?

PR Checklist

Trial launch on Jenkins using pecific branch:
https://jenkins-csb-crwqe-main.dno.corp.redhat.com/job/Testing/job/e2e/job/basic/job/api-tests/13150/console
As the author of this Pull Request I made sure that:

Reviewers

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

@artaleks9 artaleks9 requested a review from SkorikSergey June 10, 2025 08:48
@artaleks9 artaleks9 self-assigned this Jun 10, 2025
@artaleks9 artaleks9 removed the request for review from musienko-maxim June 10, 2025 08:49
@dmytro-ndp
Copy link
Contributor

I would also propose to verify the removal of the test pod after the workspace removal:

 events:
   preStop:
     - "molecule-destroy"

@artaleks9
Copy link
Contributor Author

* checks Molecule pod is removed after deleting asnsible-demo sample workspace
* @throws Error if Molecule pod is not removed within the timeout
*/
waitRemovingMoleculePod(): void {
Copy link
Contributor

@dmytro-ndp dmytro-ndp Jun 11, 2025

Choose a reason for hiding this comment

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

This method appears to be specific to the AnsibleDevFileAPI test, whereas the KubernetesCommandLineToolsExecutor class serves as a utility for common methods.

For the sake of consistency, I recommend either moving the waitRemovingMoleculePod() method to the AnsibleDevFileAPI test, or modifying this method to accept a pod name parameter waitRemovingPod(podName: string) and then calling it from AnsibleDevFileAPI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems yes, need to fix up it.
Will do.

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.

Good job, @artaleks9

PR looks good to merge, with a non-critical notice.

@artaleks9 artaleks9 merged commit 1999bed into main Jun 12, 2025
6 checks passed
@artaleks9 artaleks9 deleted the crw-7997 branch June 12, 2025 11:34
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