From 51563ef6db86a78c8609b021bdb8b5cd669a17f3 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 17 Feb 2024 22:57:36 +0100 Subject: [PATCH] fix: tests runner --- test/testshared/runner.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/testshared/runner.go b/test/testshared/runner.go index ead05d24c8e0..8f911279ef23 100644 --- a/test/testshared/runner.go +++ b/test/testshared/runner.go @@ -372,7 +372,7 @@ func InstallGolangciLint(tb testing.TB) string { // TODO(ldez) remove when we will run go1.23 on the CI. func forceDisableUnsupportedLinters(args []string) []string { - if !isGoVersion("1.21") { + if !isGoLessThan("1.22") { return args } @@ -414,7 +414,7 @@ func forceDisableUnsupportedLinters(args []string) []string { } // TODO(ldez) remove when we will run go1.23 on the CI. -func isGoVersion(tag string) bool { +func isGoLessThan(tag string) bool { vRuntime, err := hcversion.NewVersion(strings.TrimPrefix(runtime.Version(), "go")) if err != nil { return false @@ -425,5 +425,7 @@ func isGoVersion(tag string) bool { return false } - return vRuntime.GreaterThanOrEqual(vTag) + println(vRuntime.LessThanOrEqual(vTag)) + + return vRuntime.LessThan(vTag) }