mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-07 16:27:27 +00:00
trim prefix from server version
It's not part of the `flux check` output. Signed-off-by: Max Jonas Werner <mail@makk.es>
This commit is contained in:
parent
9af6175302
commit
e35da1c890
1 changed files with 4 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue