Skip to content

Commit 09286e4

Browse files
authored
Merge branch 'main' into ska/relocate-security-svl-ui-and-api-tests
2 parents ae15bbd + 146d5e7 commit 09286e4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/platform/plugins/private/interactive_setup/public/cluster_address_form.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('ClusterAddressForm', () => {
4141
await waitFor(() => {
4242
expect(coreStart.http.post).toHaveBeenLastCalledWith('/internal/interactive_setup/ping', {
4343
body: JSON.stringify({
44-
host: 'https://localhost:9200',
44+
host: 'https://localhost',
4545
}),
4646
});
4747
expect(onSuccess).toHaveBeenCalled();

src/platform/plugins/private/interactive_setup/public/cluster_address_form.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,12 @@ export const ClusterAddressForm: FunctionComponent<ClusterAddressFormProps> = ({
7474
},
7575
onSubmit: async (values) => {
7676
const url = new URL(values.host);
77-
const host = `${url.protocol}//${url.hostname}:${url.port || 9200}`;
7877

7978
const result = await http.post<PingResult>('/internal/interactive_setup/ping', {
80-
body: JSON.stringify({ host }),
79+
body: JSON.stringify({ host: url.origin }),
8180
});
8281

83-
onSuccess?.(result, { host });
82+
onSuccess?.(result, { host: url.origin });
8483
},
8584
});
8685

0 commit comments

Comments
 (0)