mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Alerting] change eventLog ILM requests to absolute URLs (#68331)
resolves https://github.com/elastic/kibana/issues/68265 This changes the ILM requests made by the eventLog from relative to absolute URLs. These requests test the existence of and create ILM policies, and are made with a cluster client using `transport.request`. Relative URLs work fine locally and in CI, however do not work on the cloud.
This commit is contained in:
parent
6f57fa0b2d
commit
e57f92549b
2 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ describe('doesIlmPolicyExist', () => {
|
|||
await clusterClientAdapter.doesIlmPolicyExist('foo');
|
||||
expect(clusterClient.callAsInternalUser).toHaveBeenCalledWith('transport.request', {
|
||||
method: 'GET',
|
||||
path: '_ilm/policy/foo',
|
||||
path: '/_ilm/policy/foo',
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -78,7 +78,7 @@ describe('createIlmPolicy', () => {
|
|||
await clusterClientAdapter.createIlmPolicy('foo', { args: true });
|
||||
expect(clusterClient.callAsInternalUser).toHaveBeenCalledWith('transport.request', {
|
||||
method: 'PUT',
|
||||
path: '_ilm/policy/foo',
|
||||
path: '/_ilm/policy/foo',
|
||||
body: { args: true },
|
||||
});
|
||||
});
|
||||
|
|
|
@ -41,7 +41,7 @@ export class ClusterClientAdapter {
|
|||
public async doesIlmPolicyExist(policyName: string): Promise<boolean> {
|
||||
const request = {
|
||||
method: 'GET',
|
||||
path: `_ilm/policy/${policyName}`,
|
||||
path: `/_ilm/policy/${policyName}`,
|
||||
};
|
||||
try {
|
||||
await this.callEs('transport.request', request);
|
||||
|
@ -55,7 +55,7 @@ export class ClusterClientAdapter {
|
|||
public async createIlmPolicy(policyName: string, policy: unknown): Promise<void> {
|
||||
const request = {
|
||||
method: 'PUT',
|
||||
path: `_ilm/policy/${policyName}`,
|
||||
path: `/_ilm/policy/${policyName}`,
|
||||
body: policy,
|
||||
};
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue