Skip to content

Commit

Permalink
Add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Dec 8, 2021
1 parent 2229309 commit 226c94c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ describe('getInstallCommandForPlatform', () => {
--fleet-server-service-token=service-token-1"
`);
});

it('should return the correct command sslCATrustedFingerprint option is passed', () => {
const res = getInstallCommandForPlatform(
'linux-mac',
'http://elasticsearch:9200',
'service-token-1',
undefined,
undefined,
false,
'fingerprint123456'
);

expect(res).toMatchInlineSnapshot(`
"sudo ./elastic-agent install \\\\
--fleet-server-es=http://elasticsearch:9200 \\\\
--fleet-server-service-token=service-token-1 \\\\
--fleet-server-es-ca-trusted-fingerprint=fingerprint123456"
`);
});
});

describe('with policy id', () => {
Expand Down

0 comments on commit 226c94c

Please sign in to comment.