Skip to content

Commit

Permalink
Test fix: propely collect hostnames for GetAgentByPolicyIDAndHostname…
Browse files Browse the repository at this point in the history
…FromList (elastic#6146)
  • Loading branch information
pazone authored Nov 26, 2024
1 parent ccf4da5 commit bb734a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/testing/tools/fleettools/fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func GetAgentByPolicyIDAndHostnameFromList(ctx context.Context, client *kibana.C
agentHostname := item.LocalMetadata.Host.Hostname
agentPolicyID := item.PolicyID

agentHostnames = append(agentHostnames, agentHostname)

if strings.EqualFold(agentHostname, hostname) && agentPolicyID == policyID {
hostnameAgents = append(hostnameAgents, &listAgentsResp.Items[i])
}
Expand Down

0 comments on commit bb734a1

Please sign in to comment.