diff --git a/cmd/flux/check_test.go b/cmd/flux/check_test.go
index abfd8463386db2072ce8ed8aa5948d18d2b31e10..50aac2004d6aba84cd78ff00ae19cc70b5ac8bae 100644
--- a/cmd/flux/check_test.go
+++ b/cmd/flux/check_test.go
@@ -22,6 +22,7 @@ package main
 import (
 	"context"
 	"encoding/json"
+	"strings"
 	"testing"
 
 	"github.com/fluxcd/flux2/internal/utils"
@@ -38,7 +39,9 @@ func TestCheckPre(t *testing.T) {
 		t.Fatalf("Error unmarshalling '%s': %v", jsonOutput, err.Error())
 	}
 
-	serverGitVersion := versions["serverVersion"].(map[string]interface{})["gitVersion"].(string)
+	serverGitVersion := strings.TrimPrefix(
+		versions["serverVersion"].(map[string]interface{})["gitVersion"].(string),
+		"v")
 
 	cmd := cmdTestCase{
 		args: "check --pre",