[SECURITY_SOLUTION][ENDPOINT] Fixes endpoint data generator (#87018)
* Fix enroll message not containing host information * Ensure all Agent Policies created are unique
This commit is contained in:
parent
409776f9b6
commit
9202fc845a
|
@ -232,8 +232,8 @@ const createPolicy = async (
|
|||
): Promise<CreatePackagePolicyResponse['item']> => {
|
||||
// Create Agent Policy first
|
||||
const newAgentPolicyData: CreateAgentPolicyRequest['body'] = {
|
||||
name: `Policy for ${policyName}`,
|
||||
description: '',
|
||||
name: `Policy for ${policyName} (${Math.random().toString(36).substr(2, 5)})`,
|
||||
description: `Policy created with endpoint data generator (${policyName})`,
|
||||
namespace: 'default',
|
||||
};
|
||||
let agentPolicy;
|
||||
|
@ -368,12 +368,7 @@ const fleetEnrollAgentForHost = async (
|
|||
},
|
||||
},
|
||||
host: {
|
||||
architecture: 'x86_64',
|
||||
hostname: endpointHost.host,
|
||||
name: endpointHost.host,
|
||||
id: '1c032ec0-3a94-4d54-9ad2-c5610c0eaba4',
|
||||
ip: ['fe80::703b:b9e6:887d:7f5/64', '10.0.2.15/24', '::1/128', '127.0.0.1/8'],
|
||||
mac: ['08:00:27:d8:c5:c0'],
|
||||
...endpointHost.host,
|
||||
},
|
||||
os: {
|
||||
family: 'windows',
|
||||
|
|
Loading…
Reference in a new issue