mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[8.17][Fleet] enable flaky test (#216597)
Backport https://github.com/elastic/kibana/pull/216460 to 8.17 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
0c966fb774
commit
1100183e7b
1 changed files with 15 additions and 12 deletions
|
@ -25,8 +25,7 @@ export default function (providerContext: FtrProviderContext) {
|
|||
const config = getService('config');
|
||||
const log = getService('log');
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/193625
|
||||
describe.skip('inputs_with_standalone_docker_agent', () => {
|
||||
describe('inputs_with_standalone_docker_agent', () => {
|
||||
skipIfNoDockerRegistry(providerContext);
|
||||
let apiKey: string;
|
||||
let agent: AgentProcess;
|
||||
|
@ -40,7 +39,7 @@ export default function (providerContext: FtrProviderContext) {
|
|||
});
|
||||
apiKey = `${res.id}:${res.api_key}`;
|
||||
|
||||
agentImage = `docker.elastic.co/beats/elastic-agent:${await getLatestVersion()}`;
|
||||
agentImage = `docker.elastic.co/elastic-agent/elastic-agent:${await getLatestVersion()}`;
|
||||
log.info(agentImage);
|
||||
await execa('docker', ['pull', agentImage]);
|
||||
});
|
||||
|
@ -77,16 +76,20 @@ ${inputsYaml}
|
|||
const MAX_ITERATIONS = 20;
|
||||
let foundMetrics = false;
|
||||
for (let i = 0; i < MAX_ITERATIONS; i++) {
|
||||
const searchRes = await es.search({
|
||||
index: 'metrics-system.cpu-default',
|
||||
q: `agent.name:${agent.name}`,
|
||||
ignore_unavailable: true,
|
||||
});
|
||||
try {
|
||||
const searchRes = await es.search({
|
||||
index: 'metrics-system.cpu-default',
|
||||
q: `agent.name:${agent.name}`,
|
||||
ignore_unavailable: true,
|
||||
});
|
||||
|
||||
// @ts-expect-error TotalHit
|
||||
if (searchRes.hits.total.value > 0) {
|
||||
foundMetrics = true;
|
||||
break;
|
||||
// @ts-expect-error TotalHit
|
||||
if (searchRes.hits.total.value > 0) {
|
||||
foundMetrics = true;
|
||||
break;
|
||||
}
|
||||
} catch (err) {
|
||||
log.error(err);
|
||||
}
|
||||
// await agent.log(); uncomment if you need to debug agent logs
|
||||
await new Promise((resolve) => setTimeout(resolve, 5 * 1000));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue