Skip to content

Commit

Permalink
Remove faulty MockaHooks.afterAll() code from E2E typescript tests (#…
Browse files Browse the repository at this point in the history
…22977)

* Don't trace getDriver() method to prevent RP error

* restore Logger.trace()

* don't delete all workspace on finish

* Remove "DELETE_ALL_WORKSPACES_ON_RUN_FINISH" parameter

* don't stop driver in MochaHooks.afterAll()
  • Loading branch information
dmytro-ndp authored May 22, 2024
1 parent 7bdaba7 commit 173d01d
Show file tree
Hide file tree
Showing 6 changed files with 1,399 additions and 1,890 deletions.
2 changes: 0 additions & 2 deletions tests/e2e/configs/sh-scripts/runFunctionalTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ initTestValues() {

export TEST_ENVIRONMENT="$OCP_INFRA $MOCHA_DIRECTORY $OCP_VERSION"
export DELETE_WORKSPACE_ON_FAILED_TEST=${DELETE_WORKSPACE_ON_FAILED_TEST:-'false'}
export DELETE_ALL_WORKSPACES_ON_RUN_FINISH=${DELETE_ALL_WORKSPACES_ON_RUN_FINISH:-'true'}
export DELETE_SCREENCAST_IF_TEST_PASS=${DELETE_SCREENCAST_IF_TEST_PASS:-'true'}
export NODE_TLS_REJECT_UNAUTHORIZED=${NODE_TLS_REJECT_UNAUTHORIZED:-'0'}
export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=${TS_OCP_LOGIN_PAGE_PROVIDER_TITLE:-'htpasswd'}
Expand All @@ -82,7 +81,6 @@ initTestValues() {
echo "TS_SELENIUM_BASE_URL=${TS_SELENIUM_BASE_URL}"
echo "TEST_ENVIRONMENT=${TEST_ENVIRONMENT}"
echo "DELETE_WORKSPACE_ON_FAILED_TEST=${DELETE_WORKSPACE_ON_FAILED_TEST}"
echo "DELETE_ALL_WORKSPACES_ON_RUN_FINISH=${DELETE_ALL_WORKSPACES_ON_RUN_FINISH}"
echo "DELETE_SCREENCAST_IF_TEST_PASS=${DELETE_SCREENCAST_IF_TEST_PASS}"
echo "NODE_TLS_REJECT_UNAUTHORIZED=${NODE_TLS_REJECT_UNAUTHORIZED}"
echo "TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=${TS_OCP_LOGIN_PAGE_PROVIDER_TITLE}"
Expand Down
6 changes: 0 additions & 6 deletions tests/e2e/constants/BASE_TEST_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export enum Platform {
}

export const BASE_TEST_CONSTANTS: {
DELETE_ALL_WORKSPACES_ON_RUN_FINISH: boolean;
OCP_INFRA: string;
DELETE_WORKSPACE_ON_FAILED_TEST: boolean;
IS_CLUSTER_DISCONNECTED: () => boolean;
Expand Down Expand Up @@ -131,11 +130,6 @@ export const BASE_TEST_CONSTANTS: {
*/
DELETE_WORKSPACE_ON_FAILED_TEST: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',

/**
* stop and remove all workspaces on test run finish
*/
DELETE_ALL_WORKSPACES_ON_RUN_FINISH: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',

/**
* constant, which prolong timeout constants for local debug.
*/
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ export * from './configs/mocharc';
export * from './driver/ChromeDriver';
export * from './driver/IDriver';
export * from './utils/BrowserTabsUtil';
export * from './utils/DevfilesRegistryHelper';
export * from './utils/DevWorkspaceConfigurationHelper';
export * from './utils/DevfilesRegistryHelper';
export * from './utils/DriverHelper';
export * from './utils/IContextParams';
export * from './utils/IKubernetesCommandLineToolsExecutor';
export * from './utils/KubernetesCommandLineToolsExecutor';
export * from './utils/Logger';
export * from './utils/request-handlers/CheApiRequestHandler';
export * from './utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler';
export * from './utils/request-handlers/headers/IAuthorizationHeaderHandler';
export * from './utils/ScreenCatcher';
export * from './utils/ShellExecutor';
export * from './utils/StringUtil';
export * from './utils/request-handlers/CheApiRequestHandler';
export * from './utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler';
export * from './utils/request-handlers/headers/IAuthorizationHeaderHandler';
export * from './utils/workspace/ApiUrlResolver';
export * from './utils/workspace/ITestWorkspaceUtil';
export * from './utils/workspace/TestWorkspaceUtil';
export * from './utils/workspace/WorkspaceStatus';
export * from './pageobjects/dashboard/CreateWorkspace';
export * from './pageobjects/dashboard/Dashboard';
export * from './pageobjects/dashboard/UserPreferences';
export * from './pageobjects/dashboard/workspace-details/WorkspaceDetails';
export * from './pageobjects/dashboard/Workspaces';
export * from './pageobjects/dashboard/workspace-details/WorkspaceDetails';
export * from './pageobjects/git-providers/OauthPage';
export * from './pageobjects/ide/CheCodeLocatorLoader';
export * from './pageobjects/login/interfaces/ICheLoginPage';
Expand Down
Loading

0 comments on commit 173d01d

Please sign in to comment.