From 288a048a2e9a8c91d635eeaebcb40dce0b8f479f Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Tue, 11 Jun 2024 08:54:27 -0400 Subject: [PATCH] e2e: add prerelease builds to Consul/Vault compatibility tests (#23287) Update the Consul/Vault build downloader functions so that we include the current prerelease build (if any) in our E2E compatibility testing we do on each PR. This will automatically cycle out when the GA build is released, because that build is "higher" in the sorted set. --- e2e/consulcompat/run_ce_test.go | 4 +--- e2e/consulcompat/shared_download_test.go | 3 --- e2e/vaultcompat/run_ce_test.go | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/e2e/consulcompat/run_ce_test.go b/e2e/consulcompat/run_ce_test.go index 1bf603ca6..86749380b 100644 --- a/e2e/consulcompat/run_ce_test.go +++ b/e2e/consulcompat/run_ce_test.go @@ -16,12 +16,10 @@ import ( // versions of Consul CE func usable(v, minimum *version.Version) bool { switch { - case v.Prerelease() != "": + case v.LessThan(minimum): return false case v.Metadata() != "": return false - case v.LessThan(minimum): - return false default: return true } diff --git a/e2e/consulcompat/shared_download_test.go b/e2e/consulcompat/shared_download_test.go index 53805cf16..728fed203 100644 --- a/e2e/consulcompat/shared_download_test.go +++ b/e2e/consulcompat/shared_download_test.go @@ -19,9 +19,6 @@ import ( "github.com/shoenig/test/must" ) -// TODO: it would be good if we can add the latest non-GA'd beta/release -// candidate version as well; that'll give us some lead time on any breaking -// changes const ( binDir = "consul-bins" minConsulVersion = "1.16.0" diff --git a/e2e/vaultcompat/run_ce_test.go b/e2e/vaultcompat/run_ce_test.go index 52f239caa..fd0cf6a54 100644 --- a/e2e/vaultcompat/run_ce_test.go +++ b/e2e/vaultcompat/run_ce_test.go @@ -17,8 +17,6 @@ import ( // versions of Vault CE func usable(v, minimum *version.Version) bool { switch { - case v.Prerelease() != "": - return false case v.Metadata() != "": return false case v.LessThan(minimum):