Skip to content

Commit

Permalink
[Rename] kbn-test in packages directory to osd-test/ #37 [3] (#55)
Browse files Browse the repository at this point in the history
* [Rename] kbn-test in packages directory to osd-test/functional_test_runner

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>

* [Rename] kbn-test in packages directory to osd-test/functional_tests

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>

* [Rename] kbn-test/src/failed_tests_reporter in packages directory to osd-test/failed_tests_reporter

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>

* [Rename] addressed review feedbacks
  • Loading branch information
mihirsoni committed Mar 20, 2021
1 parent 54063dd commit 873350e
Show file tree
Hide file tree
Showing 20 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To fetch some JUnit reports from a recent build on CI, visit its `Google Cloud S
copy(`wget -x -nH --cut-dirs 5 -P "target/downloaded_junit" "${Array.from($$('a[href$=".xml"]')).filter(a => a.innerText === 'Download').map(a => a.href.replace('https://storage.cloud.google.com/', 'https://storage.googleapis.com/')).join('" "')}"`)
```

This copies a script to download the reports, which you should execute in the root of the Kibana repository.
This copies a script to download the reports, which you should execute in the root of the Opensearch Dashboards repository.

Next, run the CLI in `--no-github-update` mode so that it doesn't actually communicate with Github and `--no-report-update` to prevent the script from mutating the reports on disk and instead log the updated report.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</body>
</html>
at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/kbn-es/src/artifact.js:95:13)
at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/osd-opensearch/src/artifact.js:95:13)
at process._tickCallback (internal/process/next_tick.js:68:7)]]>
</failure>
</testcase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import Path from 'path';

import { ToolingLog } from '@kbn/dev-utils';
import { ToolingLog } from '@osd/dev-utils';
// @ts-ignore
import { createPatch } from 'diff';

Expand Down Expand Up @@ -237,7 +237,7 @@ it('rewrites mocha reports with minimal changes', async () => {
‹/body›
‹/html›
at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/kbn-es/src/artifact.js:95:13)
at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/osd-es/src/artifact.js:95:13)
- at process._tickCallback (internal/process/next_tick.js:68:7)]]›
- ‹/failure›
+ at process._tickCallback (internal/process/next_tick.js:68:7)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import Fs from 'fs';
import { promisify } from 'util';

import { ToolingLog } from '@kbn/dev-utils';
import { ToolingLog } from '@osd/dev-utils';
import xml2js from 'xml2js';

import { TestReport, makeFailedTestCaseIter } from './test_report';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ it('discovers failures in mocha report', async () => {
</body>
</html>
at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/kbn-es/src/artifact.js:95:13)
at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/osd-opensearch/src/artifact.js:95:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
",
"likelyIrrelevant": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const isLikelyIrrelevant = (name: string, failure: string) => {
return true;
}

if (failure.includes('Unable to fetch Kibana status API response from Kibana')) {
if (failure.includes('Unable to fetch Opensearch Dashboards status API response from Opensearch Dashboards')) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Url from 'url';

import Axios, { AxiosRequestConfig, AxiosInstance } from 'axios';
import parseLinkHeader from 'parse-link-header';
import { ToolingLog, isAxiosResponseError, isAxiosRequestError } from '@kbn/dev-utils';
import { ToolingLog, isAxiosResponseError, isAxiosRequestError } from '@osd/dev-utils';

const BASE_URL = 'https://api.github.com/repos/elastic/kibana/';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @kbn/eslint/require-license-header */
/* eslint-disable @osd/eslint/require-license-header */

/* @notice
* This product bundles code based on probot-metadata@1.0.0 which is
Expand Down Expand Up @@ -29,7 +29,7 @@
* `prefix` is a string that can be used to namespace the metadata, defaults to `ci`.
*/
const PREFIX = 'failed-test';
const REGEX = /\n\n<!-- kibanaCiData = (.*) -->/;
const REGEX = /\n\n<!-- OpenSearchDashboardsCiData = (.*) -->/;

function safeJsonParse(json: string, onError: any) {
try {
Expand Down Expand Up @@ -65,5 +65,5 @@ export function updateIssueMetadata(body: string, values: Record<string, any>) {
});
}

return `${body}\n\n<!-- kibanaCiData = ${JSON.stringify({ [PREFIX]: values })} -->`;
return `${body}\n\n<!-- OpenSearchDashboardsCiData = ${JSON.stringify({ [PREFIX]: values })} -->`;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import Path from 'path';

import { REPO_ROOT } from '@kbn/utils';
import { run, createFailError, createFlagError } from '@kbn/dev-utils';
import { REPO_ROOT } from '@osd/utils';
import { run, createFailError, createFlagError } from '@osd/dev-utils';
import globby from 'globby';

import { getFailures, TestFailure } from './get_failures';
Expand Down

0 comments on commit 873350e

Please sign in to comment.