Skip to content

Commit

Permalink
use getUrlPartsWithStrippedDefaultPort
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi committed Nov 7, 2024
1 parent 669761b commit 09d5b48
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down

0 comments on commit 09d5b48

Please sign in to comment.