@eclipse-che/che-e2e 7.76.0-next-a90153c → 7.76.0-next-f98fe6d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/mocharc.ts +4 -2
- package/configs/reporters.config.js +51 -0
- package/configs/sh-scripts/runDevfileAcceptanceTests.sh +81 -0
- package/configs/sh-scripts/runFunctionalTests.sh +6 -6
- package/constants/BASE_TEST_CONSTANTS.ts +15 -3
- package/constants/MOCHA_CONSTANTS.ts +5 -2
- package/constants/REPORTER_CONSTANTS.ts +98 -5
- package/constants/TIMEOUT_CONSTANTS.ts +10 -22
- package/dist/configs/mocharc.js +4 -2
- package/dist/configs/mocharc.js.map +1 -1
- package/dist/constants/BASE_TEST_CONSTANTS.js +12 -2
- package/dist/constants/BASE_TEST_CONSTANTS.js.map +1 -1
- package/dist/constants/MOCHA_CONSTANTS.js +3 -2
- package/dist/constants/MOCHA_CONSTANTS.js.map +1 -1
- package/dist/constants/REPORTER_CONSTANTS.js +70 -2
- package/dist/constants/REPORTER_CONSTANTS.js.map +1 -1
- package/dist/constants/TIMEOUT_CONSTANTS.js +0 -8
- package/dist/constants/TIMEOUT_CONSTANTS.js.map +1 -1
- package/dist/specs/MochaHooks.js +4 -3
- package/dist/specs/MochaHooks.js.map +1 -1
- package/dist/specs/SmokeTest.spec.js +1 -1
- package/dist/specs/SmokeTest.spec.js.map +1 -1
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js +3 -1
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js.map +1 -1
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js +0 -3
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -1
- package/dist/suites/devfile-acceptance-test-suite/DynamicallyGeneratingAPITest.suite.js +13 -0
- package/dist/suites/devfile-acceptance-test-suite/DynamicallyGeneratingAPITest.suite.js.map +1 -0
- package/dist/tests-library/LoginTests.js +1 -1
- package/dist/tests-library/LoginTests.js.map +1 -1
- package/dist/utils/DevWorkspaceConfigurationHelper.js +2 -1
- package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -1
- package/dist/utils/DevfilesRegistryHelper.js +40 -37
- package/dist/utils/DevfilesRegistryHelper.js.map +1 -1
- package/dist/utils/KubernetesCommandLineToolsExecutor.js +9 -8
- package/dist/utils/KubernetesCommandLineToolsExecutor.js.map +1 -1
- package/package.json +10 -9
- package/specs/MochaHooks.ts +4 -3
- package/specs/SmokeTest.spec.ts +1 -1
- package/specs/api/DevfileAcceptanceTestAPI.spec.ts +5 -1
- package/specs/api/EmptyWorkspaceAPI.spec.ts +0 -4
- package/suites/devfile-acceptance-test-suite/DynamicallyGeneratingAPITest.suite.ts +10 -0
- package/tests-library/LoginTests.ts +4 -1
- package/tsconfig.json +1 -1
- package/utils/DevWorkspaceConfigurationHelper.ts +4 -1
- package/utils/DevfilesRegistryHelper.ts +41 -39
- package/utils/KubernetesCommandLineToolsExecutor.ts +8 -8
- package/configs/reporters-config.json +0 -6
|
@@ -28,54 +28,56 @@ export class DevfilesRegistryHelper {
|
|
|
28
28
|
async getGitHubCheDevfileRegistryContent(): Promise<AxiosResponse> {
|
|
29
29
|
Logger.trace();
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
const url: string =
|
|
32
|
+
API_TEST_CONSTANTS.TS_API_ACCEPTANCE_TEST_REGISTRY_URL() === ''
|
|
33
|
+
? SUPPORTED_DEVFILE_REGISTRIES.GIT_HUB_CHE_DEVFILE_REGISTRY_URL
|
|
34
|
+
: API_TEST_CONSTANTS.TS_API_ACCEPTANCE_TEST_REGISTRY_URL();
|
|
35
|
+
return await this.getContent(url);
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
async collectPathsToDevfilesFromRegistry(isInbuilt: boolean
|
|
38
|
+
async collectPathsToDevfilesFromRegistry(isInbuilt: boolean, sampleNamePatterns?: string[]): Promise<object[]> {
|
|
35
39
|
Logger.debug();
|
|
36
40
|
|
|
37
41
|
const devfileSamples: object[] = [];
|
|
38
42
|
const sampleNames: string[] = [];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
sampleNames.push(e.name);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
for (const sample of sampleNames) {
|
|
50
|
-
const sampleEndpoint: string = `${SUPPORTED_DEVFILE_REGISTRIES.GIT_HUB_CHE_DEVFILE_REGISTRY_URL}${sample}/meta.yaml`;
|
|
51
|
-
const sampleEndpointContent: AxiosResponse = await this.getContent(sampleEndpoint);
|
|
52
|
-
const decodedFileContent: string = Buffer.from((sampleEndpointContent as any).content, 'base64').toString();
|
|
53
|
-
const metaYamlContent: any = YAML.parse(decodedFileContent);
|
|
54
|
-
devfileSamples.push({
|
|
55
|
-
name: sample,
|
|
56
|
-
link: metaYamlContent.links.v2
|
|
57
|
-
});
|
|
43
|
+
if (!isInbuilt) {
|
|
44
|
+
{
|
|
45
|
+
const content: any[any] = await this.getGitHubCheDevfileRegistryContent();
|
|
46
|
+
content.forEach((e: any): void => {
|
|
47
|
+
if (e.name[0] !== '.') {
|
|
48
|
+
sampleNames.push(e.name);
|
|
58
49
|
}
|
|
59
|
-
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
for (const sample of sampleNames) {
|
|
53
|
+
const sampleEndpoint: string = `${SUPPORTED_DEVFILE_REGISTRIES.GIT_HUB_CHE_DEVFILE_REGISTRY_URL}${sample}/meta.yaml`;
|
|
54
|
+
const sampleEndpointContent: AxiosResponse = await this.getContent(sampleEndpoint);
|
|
55
|
+
const decodedFileContent: string = Buffer.from((sampleEndpointContent as any).content, 'base64').toString();
|
|
56
|
+
const metaYamlContent: any = YAML.parse(decodedFileContent);
|
|
57
|
+
devfileSamples.push({
|
|
58
|
+
name: sample,
|
|
59
|
+
link: metaYamlContent.links.v2
|
|
60
|
+
});
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
Logger.debug(`samples list: ${JSON.stringify(devfileSamples)}`);
|
|
62
|
+
Logger.debug(`samples list: ${JSON.stringify(devfileSamples)}`);
|
|
63
|
+
}
|
|
64
|
+
} else if (isInbuilt) {
|
|
65
|
+
{
|
|
66
|
+
const content: any[any] = await this.getInbuiltDevfilesRegistryContent(sampleNamePatterns);
|
|
67
|
+
for (const sample of content) {
|
|
68
|
+
const linkToDevWorkspaceYaml: any =
|
|
69
|
+
BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL +
|
|
70
|
+
'/devfile-registry' +
|
|
71
|
+
sample.links.devWorkspaces['che-incubator/che-code/latest'];
|
|
72
|
+
devfileSamples.push({
|
|
73
|
+
name: sample.displayName,
|
|
74
|
+
devWorkspaceConfigurationString: await this.getContent(linkToDevWorkspaceYaml)
|
|
75
|
+
});
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
Logger.debug(`samples list: ${JSON.stringify(devfileSamples)}`);
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
{
|
|
79
81
|
Logger.error(`unsupported registry url - ${API_TEST_CONSTANTS.TS_API_ACCEPTANCE_TEST_REGISTRY_URL()}\n
|
|
80
82
|
supported registries: ${JSON.stringify(SUPPORTED_DEVFILE_REGISTRIES)}`);
|
|
81
83
|
}
|
|
@@ -46,14 +46,14 @@ export class KubernetesCommandLineToolsExecutor implements IKubernetesCommandLin
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
get namespace(): string | undefined {
|
|
49
|
-
this._namespace
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
if (!this._namespace) {
|
|
50
|
+
const applicationName: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME();
|
|
51
|
+
if (applicationName === 'default') {
|
|
52
|
+
this._namespace = applicationName;
|
|
53
|
+
} else {
|
|
54
|
+
this._namespace = OAUTH_CONSTANTS.TS_SELENIUM_OCP_USERNAME + '-' + applicationName;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
57
|
return this._namespace;
|
|
58
58
|
}
|
|
59
59
|
|