Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Janine Olear <pninak@web.de>
  • Loading branch information
miyunari committed Aug 30, 2024
1 parent 7c2ad19 commit 31803ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/cosign/cli/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
reGitVersion = regexp.MustCompile(fmt.Sprintf("\nGitVersion:\\s+%s\n", expectedVersionInfo.GitVersion))
reGitCommmit = regexp.MustCompile(fmt.Sprintf("GitCommit:\\s+%s\n", expectedVersionInfo.GitCommit))
reBuildDate = regexp.MustCompile(fmt.Sprintf("BuildDate:\\s+%s\n", expectedVersionInfo.BuildDate))
reGoVersion = regexp.MustCompile(fmt.Sprintf("GoVersion:\\s+%s*\n", expectedVersionInfo.GoVersion))
reGoVersion = regexp.MustCompile(fmt.Sprintf("GoVersion:\\s+%s\n", expectedVersionInfo.GoVersion))
reCompiler = regexp.MustCompile(fmt.Sprintf("Compiler:\\s+%s\n", expectedVersionInfo.Compiler))
rePlatform = regexp.MustCompile(fmt.Sprintf("Platform:\\s+%s\n", expectedVersionInfo.Platform))
)
Expand Down Expand Up @@ -70,6 +70,10 @@ func testVersionASCII(t *testing.T) {
assert.Regexp(t, reGitVersion, output, "output doesn't contain the Git version tag")
assert.Regexp(t, reGitCommmit, output, "output doesn't contain the Git commit hash")
assert.Regexp(t, reBuildDate, output, "output doesn't contain the build date")
t.Log("got")
t.Log(output)
t.Log("regex")
t.Log(reGoVersion)
assert.Regexp(t, reGoVersion, output, "output doesn't contain the Go version")
assert.Regexp(t, reCompiler, output, "output doesn't contain the compiler name")
assert.Regexp(t, rePlatform, output, "output doesn't contain the platform name")
Expand Down

0 comments on commit 31803ae

Please sign in to comment.