From 8ada9e835e68a847c4d85400cf5c98883f911486 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 8 Jul 2024 12:51:47 -0400 Subject: [PATCH] [Fleet] Always use a SNAPSHOT version when running elastic-agent docker image --- x-pack/test/fleet_cypress/artifact_manager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/test/fleet_cypress/artifact_manager.ts b/x-pack/test/fleet_cypress/artifact_manager.ts index 0fe6609f28efc..23efabe2d976a 100644 --- a/x-pack/test/fleet_cypress/artifact_manager.ts +++ b/x-pack/test/fleet_cypress/artifact_manager.ts @@ -15,6 +15,10 @@ export async function getLatestVersion(): Promise { return pRetry(() => axios('https://artifacts-api.elastic.co/v1/versions'), { maxRetryTime: 60 * 1000, // 1 minute }) - .then((response) => last(response.data.versions as string[]) || DEFAULT_VERSION) + .then( + (response) => + last((response.data.versions as string[]).filter((v) => v.includes('-SNAPSHOT'))) || + DEFAULT_VERSION + ) .catch(() => DEFAULT_VERSION); }