Skip to content

Commit 173d01d

Browse files
authored
Remove faulty MockaHooks.afterAll() code from E2E typescript tests (#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()
1 parent 7bdaba7 commit 173d01d

File tree

6 files changed

+1399
-1890
lines changed

6 files changed

+1399
-1890
lines changed

tests/e2e/configs/sh-scripts/runFunctionalTests.sh

-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ initTestValues() {
6161

6262
export TEST_ENVIRONMENT="$OCP_INFRA $MOCHA_DIRECTORY $OCP_VERSION"
6363
export DELETE_WORKSPACE_ON_FAILED_TEST=${DELETE_WORKSPACE_ON_FAILED_TEST:-'false'}
64-
export DELETE_ALL_WORKSPACES_ON_RUN_FINISH=${DELETE_ALL_WORKSPACES_ON_RUN_FINISH:-'true'}
6564
export DELETE_SCREENCAST_IF_TEST_PASS=${DELETE_SCREENCAST_IF_TEST_PASS:-'true'}
6665
export NODE_TLS_REJECT_UNAUTHORIZED=${NODE_TLS_REJECT_UNAUTHORIZED:-'0'}
6766
export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=${TS_OCP_LOGIN_PAGE_PROVIDER_TITLE:-'htpasswd'}
@@ -82,7 +81,6 @@ initTestValues() {
8281
echo "TS_SELENIUM_BASE_URL=${TS_SELENIUM_BASE_URL}"
8382
echo "TEST_ENVIRONMENT=${TEST_ENVIRONMENT}"
8483
echo "DELETE_WORKSPACE_ON_FAILED_TEST=${DELETE_WORKSPACE_ON_FAILED_TEST}"
85-
echo "DELETE_ALL_WORKSPACES_ON_RUN_FINISH=${DELETE_ALL_WORKSPACES_ON_RUN_FINISH}"
8684
echo "DELETE_SCREENCAST_IF_TEST_PASS=${DELETE_SCREENCAST_IF_TEST_PASS}"
8785
echo "NODE_TLS_REJECT_UNAUTHORIZED=${NODE_TLS_REJECT_UNAUTHORIZED}"
8886
echo "TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=${TS_OCP_LOGIN_PAGE_PROVIDER_TITLE}"

tests/e2e/constants/BASE_TEST_CONSTANTS.ts

-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export enum Platform {
1313
}
1414

1515
export const BASE_TEST_CONSTANTS: {
16-
DELETE_ALL_WORKSPACES_ON_RUN_FINISH: boolean;
1716
OCP_INFRA: string;
1817
DELETE_WORKSPACE_ON_FAILED_TEST: boolean;
1918
IS_CLUSTER_DISCONNECTED: () => boolean;
@@ -131,11 +130,6 @@ export const BASE_TEST_CONSTANTS: {
131130
*/
132131
DELETE_WORKSPACE_ON_FAILED_TEST: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',
133132

134-
/**
135-
* stop and remove all workspaces on test run finish
136-
*/
137-
DELETE_ALL_WORKSPACES_ON_RUN_FINISH: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',
138-
139133
/**
140134
* constant, which prolong timeout constants for local debug.
141135
*/

tests/e2e/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ export * from './configs/mocharc';
55
export * from './driver/ChromeDriver';
66
export * from './driver/IDriver';
77
export * from './utils/BrowserTabsUtil';
8-
export * from './utils/DevfilesRegistryHelper';
98
export * from './utils/DevWorkspaceConfigurationHelper';
9+
export * from './utils/DevfilesRegistryHelper';
1010
export * from './utils/DriverHelper';
1111
export * from './utils/IContextParams';
1212
export * from './utils/IKubernetesCommandLineToolsExecutor';
1313
export * from './utils/KubernetesCommandLineToolsExecutor';
1414
export * from './utils/Logger';
15-
export * from './utils/request-handlers/CheApiRequestHandler';
16-
export * from './utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler';
17-
export * from './utils/request-handlers/headers/IAuthorizationHeaderHandler';
1815
export * from './utils/ScreenCatcher';
1916
export * from './utils/ShellExecutor';
2017
export * from './utils/StringUtil';
18+
export * from './utils/request-handlers/CheApiRequestHandler';
19+
export * from './utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler';
20+
export * from './utils/request-handlers/headers/IAuthorizationHeaderHandler';
2121
export * from './utils/workspace/ApiUrlResolver';
2222
export * from './utils/workspace/ITestWorkspaceUtil';
2323
export * from './utils/workspace/TestWorkspaceUtil';
2424
export * from './utils/workspace/WorkspaceStatus';
2525
export * from './pageobjects/dashboard/CreateWorkspace';
2626
export * from './pageobjects/dashboard/Dashboard';
2727
export * from './pageobjects/dashboard/UserPreferences';
28-
export * from './pageobjects/dashboard/workspace-details/WorkspaceDetails';
2928
export * from './pageobjects/dashboard/Workspaces';
29+
export * from './pageobjects/dashboard/workspace-details/WorkspaceDetails';
3030
export * from './pageobjects/git-providers/OauthPage';
3131
export * from './pageobjects/ide/CheCodeLocatorLoader';
3232
export * from './pageobjects/login/interfaces/ICheLoginPage';

0 commit comments

Comments
 (0)