Skip to content

Commit

Permalink
[Fleet] Fix space awareness tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Aug 2, 2024
1 parent 964fb66 commit 186261e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x-pack/plugins/fleet/server/services/agents/action_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ async function getActionResults(
try {
acks = await esClient.search({
index: AGENT_ACTIONS_RESULTS_INDEX,
ignore_unavailable: true,
query: {
bool: {
// There's some perf/caching advantages to using filter over must
Expand Down Expand Up @@ -104,6 +105,7 @@ async function getActionResults(
// query to find errors in action results, cannot do aggregation on text type
const errorResults = await esClient.search({
index: AGENT_ACTIONS_RESULTS_INDEX,
ignore_unavailable: true,
track_total_hits: true,
rest_total_hits_as_int: true,
query: {
Expand Down Expand Up @@ -386,6 +388,7 @@ async function getPolicyChangeActions(
};
const agentPoliciesRes = await esClient.search({
index: AGENT_POLICY_INDEX,
ignore_unavailable: true,
size: getPerPage(options),
query: addNamespaceFilteringToQuery(query, namespace),
sort: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export async function cleanFleetActionIndices(esClient: Client) {
esClient.deleteByQuery({
index: AGENT_POLICY_INDEX,
q: '*',
refresh: true,
}),
esClient.deleteByQuery({
index: AGENT_ACTIONS_INDEX,
Expand All @@ -51,6 +52,7 @@ export async function cleanFleetActionIndices(esClient: Client) {
{
index: AGENT_ACTIONS_RESULTS_INDEX,
q: '*',
refresh: true,
},
ES_INDEX_OPTIONS
),
Expand Down

0 comments on commit 186261e

Please sign in to comment.