mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Use getUrlPartsWithStrippedDefaultPort instead of getUrlParts (#199264)
## Summary Use getUrlPartsWithStrippedDefaultPort to avoid this [issue](https://github.com/elastic/kibana/pull/195902#issuecomment-2411667499) on MKI: ``` Serverless Observability - Deployment-agnostic api integration - Custom Threshold rule AVG - PCT - FIRED Rule creation should set correct action variables Error: expected '1e0c2d3e
-e5c2-4bfe-9df0-d46681253b9f' to sort of equal '1e0c2d3e
-e5c2-4bfe-9df0-d46681253b9f' ```
This commit is contained in:
parent
c9d167f1ab
commit
996104f2ea
4 changed files with 4 additions and 4 deletions
|
@ -249,7 +249,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
|
|||
docCountTarget: 1,
|
||||
});
|
||||
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlParts();
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlPartsWithStrippedDefaultPort();
|
||||
expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold');
|
||||
expect(resp.hits.hits[0]._source?.alertDetailsUrl).eql(
|
||||
`${protocol}://${hostname}${port ? `:${port}` : ''}/app/observability/alerts/${alertId}`
|
||||
|
|
|
@ -247,7 +247,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
|
|||
docCountTarget: 1,
|
||||
});
|
||||
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlParts();
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlPartsWithStrippedDefaultPort();
|
||||
|
||||
expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold');
|
||||
expect(resp.hits.hits[0]._source?.alertDetailsUrl).eql(
|
||||
|
|
|
@ -272,7 +272,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
|
|||
const resp = await alertingApi.waitForDocumentInIndex<ActionDocument>({
|
||||
indexName: ALERT_ACTION_INDEX,
|
||||
});
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlParts();
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlPartsWithStrippedDefaultPort();
|
||||
|
||||
expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold');
|
||||
expect(resp.hits.hits[0]._source?.alertDetailsUrl).eql(
|
||||
|
|
|
@ -244,7 +244,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
|
|||
docCountTarget: 1,
|
||||
});
|
||||
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlParts();
|
||||
const { protocol, hostname, port } = kbnTestConfig.getUrlPartsWithStrippedDefaultPort();
|
||||
expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold');
|
||||
expect(resp.hits.hits[0]._source?.alertDetailsUrl).eql(
|
||||
`${protocol}://${hostname}${port ? `:${port}` : ''}/app/observability/alerts/${alertId}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue