Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Fleet startup', () => {
cy.getBySel('agentPolicyDropdown');

// verify fleet server enroll command contains created policy id
cy.getBySel('fleetServerHostInput').type('http://localhost:8220');
cy.getBySel('fleetServerHostInput').type('https://localhost:8220');
cy.getBySel('fleetServerAddHostBtn').click();
cy.getBySel('fleetServerGenerateServiceTokenBtn').click();
cy.get('.euiCodeBlock__code').contains('--fleet-server-policy=fleet-server-policy');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import { PlatformSelector } from '../../../../../../components/enrollment_instru
import type { CommandsByPlatform } from './install_command_utils';
import { getInstallCommandForPlatform } from './install_command_utils';

const URL_REGEX = /^(https?):\/\/[^\s$.?#].[^\s]*$/gm;
const URL_REGEX = /^(https):\/\/[^\s$.?#].[^\s]*$/gm;
const REFRESH_INTERVAL = 10000;

type DeploymentMode = 'production' | 'quickstart';
Expand Down Expand Up @@ -379,7 +379,7 @@ export const AddFleetServerHostStepContent = ({
} else {
setError(
i18n.translate('xpack.fleet.fleetServerSetup.addFleetServerHostInvalidUrlError', {
defaultMessage: 'Invalid URL',
defaultMessage: 'Valid https URL required.',
})
);
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ describe('getInstallCommandForPlatform', () => {
expect(res.linux).toMatchInlineSnapshot(`
"sudo ./elastic-agent install \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-insecure-http"
--fleet-server-service-token=service-token-1"
`);
});

Expand All @@ -26,8 +25,7 @@ describe('getInstallCommandForPlatform', () => {
expect(res.mac).toMatchInlineSnapshot(`
"sudo ./elastic-agent install \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-insecure-http"
--fleet-server-service-token=service-token-1"
`);
});

Expand All @@ -37,8 +35,7 @@ describe('getInstallCommandForPlatform', () => {
expect(res.windows).toMatchInlineSnapshot(`
".\\\\elastic-agent.exe install \`
--fleet-server-es=http://elasticsearch:9200 \`
--fleet-server-service-token=service-token-1 \`
--fleet-server-insecure-http"
--fleet-server-service-token=service-token-1"
`);
});

Expand All @@ -48,8 +45,7 @@ describe('getInstallCommandForPlatform', () => {
expect(res.rpm).toMatchInlineSnapshot(`
"sudo elastic-agent enroll \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-insecure-http"
--fleet-server-service-token=service-token-1"
`);
});

Expand All @@ -59,8 +55,7 @@ describe('getInstallCommandForPlatform', () => {
expect(res.deb).toMatchInlineSnapshot(`
"sudo elastic-agent enroll \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-insecure-http"
--fleet-server-service-token=service-token-1"
`);
});

Expand All @@ -78,8 +73,7 @@ describe('getInstallCommandForPlatform', () => {
"sudo ./elastic-agent install \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-es-ca-trusted-fingerprint=fingerprint123456 \\\\
--fleet-server-insecure-http"
--fleet-server-es-ca-trusted-fingerprint=fingerprint123456"
`);
});
});
Expand All @@ -96,8 +90,7 @@ describe('getInstallCommandForPlatform', () => {
"sudo ./elastic-agent install \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-policy=policy-1 \\\\
--fleet-server-insecure-http"
--fleet-server-policy=policy-1"
`);
});

Expand All @@ -112,8 +105,7 @@ describe('getInstallCommandForPlatform', () => {
"sudo ./elastic-agent install \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-policy=policy-1 \\\\
--fleet-server-insecure-http"
--fleet-server-policy=policy-1"
`);
});

Expand All @@ -128,8 +120,7 @@ describe('getInstallCommandForPlatform', () => {
".\\\\elastic-agent.exe install \`
--fleet-server-es=http://elasticsearch:9200 \`
--fleet-server-service-token=service-token-1 \`
--fleet-server-policy=policy-1 \`
--fleet-server-insecure-http"
--fleet-server-policy=policy-1"
`);
});

Expand All @@ -144,8 +135,7 @@ describe('getInstallCommandForPlatform', () => {
"sudo elastic-agent enroll \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-policy=policy-1 \\\\
--fleet-server-insecure-http"
--fleet-server-policy=policy-1"
`);
});

Expand All @@ -160,8 +150,7 @@ describe('getInstallCommandForPlatform', () => {
"sudo elastic-agent enroll \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-policy=policy-1 \\\\
--fleet-server-insecure-http"
--fleet-server-policy=policy-1"
`);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ export function getInstallCommandForPlatform(
}
commandArguments.push(['fleet-server-cert', '<PATH_TO_FLEET_SERVER_CERT>']);
commandArguments.push(['fleet-server-cert-key', '<PATH_TO_FLEET_SERVER_CERT_KEY>']);
} else {
commandArguments.push(['fleet-server-insecure-http']);
}

const commandArgumentsStr = (platform?: string) => {
Expand Down