Skip to content

Commit

Permalink
Test fleet server port in API tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed May 3, 2021
1 parent 2ee16b5 commit 5a5487b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions x-pack/test/fleet_api_integration/apis/settings/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ export default function (providerContext: FtrProviderContext) {
after(async () => {
await esArchiver.unload('fleet/empty_fleet_server');
});

it('should explicetly set port on fleet_server_hosts', async function () {
await supertest
.put(`/api/fleet/settings`)
.set('kbn-xsrf', 'xxxx')
.send({ fleet_server_hosts: ['https://test.fr'] })
.expect(200);

const { body: getSettingsRes } = await supertest.get(`/api/fleet/settings`).expect(200);
expect(getSettingsRes.item.fleet_server_hosts).to.eql(['https://test.fr:443']);
});

it("should bump all agent policy's revision", async function () {
const { body: testPolicy1PostRes } = await supertest
.post(`/api/fleet/agent_policies`)
Expand Down

0 comments on commit 5a5487b

Please sign in to comment.