Skip to content

Commit

Permalink
[Agentless] Fix agentless global_data_tags (#199247)
Browse files Browse the repository at this point in the history
  • Loading branch information
opauloh authored Nov 7, 2024
1 parent b0af8af commit ef205b8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,11 @@ describe('Agentless Agent service', () => {
policy_id: 'mocked-agentless-agent-policy-id',
stack_version: 'mocked-kibana-version-infinite',
labels: {
organization: 'elastic',
division: 'cloud',
team: 'fleet',
owner: {
org: 'elastic',
division: 'cloud',
team: 'fleet',
},
},
}),
headers: expect.anything(),
Expand Down Expand Up @@ -911,9 +913,11 @@ describe('Agentless Agent service', () => {
fleet_url: 'http://fleetserver:8220',
policy_id: 'mocked-agentless-agent-policy-id',
labels: {
organization: 'elastic',
division: 'cloud',
team: 'fleet',
owner: {
org: 'elastic',
division: 'cloud',
team: 'fleet',
},
},
},
headers: expect.anything(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ class AgentlessAgentService {
agentlessAgentPolicy.global_data_tags?.find((tag) => tag.name === name)?.value;

return {
organization: getGlobalTagValueByName(AGENTLESS_GLOBAL_TAG_NAME_ORGANIZATION),
division: getGlobalTagValueByName(AGENTLESS_GLOBAL_TAG_NAME_DIVISION),
team: getGlobalTagValueByName(AGENTLESS_GLOBAL_TAG_NAME_TEAM),
owner: {
org: getGlobalTagValueByName(AGENTLESS_GLOBAL_TAG_NAME_ORGANIZATION),
division: getGlobalTagValueByName(AGENTLESS_GLOBAL_TAG_NAME_DIVISION),
team: getGlobalTagValueByName(AGENTLESS_GLOBAL_TAG_NAME_TEAM),
},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const AWS_SINGLE_ACCOUNT_TEST_ID = 'awsSingleTestId';

describe('Agentless API Serverless', function () {
// see details: https://github.com/elastic/kibana/issues/199091
this.tags(['failsOnMKI']);
let mockApiServer: http.Server;
let cisIntegration: typeof pageObjects.cisAddIntegration;

Expand Down

0 comments on commit ef205b8

Please sign in to comment.