Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix e2e tests #2748

Merged
merged 3 commits into from
May 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
trim prefix from server version
It's not part of the `flux check` output.

Signed-off-by: Max Jonas Werner <mail@makk.es>
  • Loading branch information
Max Jonas Werner committed May 18, 2022
commit e35da1c8904e20955ddf811db225aae587e30dac
5 changes: 4 additions & 1 deletion cmd/flux/check_test.go
Original file line number Diff line number Diff line change
@@ -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",