-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some e2e test for container details view
- Loading branch information
1 parent
7753742
commit a69a97b
Showing
10 changed files
with
217 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
x-pack/test/common/services/infra_synthtrace_kibana_client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import url from 'url'; | ||
import { kbnTestConfig } from '@kbn/test'; | ||
import { InfraSynthtraceKibanaClient, createLogger, LogLevel } from '@kbn/apm-synthtrace'; | ||
|
||
const getKibanaServerUrlWithAuth = () => { | ||
const kibanaServerUrl = url.format(kbnTestConfig.getUrlParts() as url.UrlObject); | ||
const kibanaServerUrlWithAuth = url | ||
.format({ | ||
...url.parse(kibanaServerUrl), | ||
auth: `elastic:${kbnTestConfig.getUrlParts().password}`, | ||
}) | ||
.slice(0, -1); | ||
return kibanaServerUrlWithAuth; | ||
}; | ||
|
||
export function InfraSynthtraceKibanaClientProvider() { | ||
const kibanaServerUrlWithAuth = getKibanaServerUrlWithAuth(); | ||
const target = kibanaServerUrlWithAuth; | ||
const logger = createLogger(LogLevel.debug); | ||
const username = 'elastic'; | ||
const password = kbnTestConfig.getUrlParts().password || 'changeme'; | ||
const kibanaClient = new InfraSynthtraceKibanaClient({ | ||
target, | ||
logger, | ||
username, | ||
password, | ||
}); | ||
|
||
return kibanaClient; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { Client } from '@elastic/elasticsearch'; | ||
import { InfraSynthtraceEsClient, createLogger, LogLevel } from '@kbn/apm-synthtrace'; | ||
|
||
export async function getInfraSynthtraceEsClient(client: Client) { | ||
return new InfraSynthtraceEsClient({ | ||
client, | ||
logger: createLogger(LogLevel.info), | ||
refreshAfterIndex: true, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.