Skip to content

Commit

Permalink
Avoid cases when comparing in TestGitPipelineRun
Browse files Browse the repository at this point in the history
Since
40e340f
sometime git have `could` and some git version has `Could` so let's not worry
about this.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
  • Loading branch information
chmouel committed Sep 27, 2019
1 parent 4fc6231 commit 6480717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/git_checkout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func TestGitPipelineRunFail(t *testing.T) {
t.Fatalf("Error getting pod logs for pod `%s` and container `%s` in namespace `%s`", tr.Status.PodName, stat.Name, namespace)
}
// Check for failure messages from fetch and pull in the log file
if strings.Contains(string(logContent), "couldn't find remote ref Idontexistrabbitmonkeydonkey") &&
strings.Contains(string(logContent), "pathspec 'Idontexistrabbitmonkeydonkey' did not match any file(s) known to git") {
if strings.Contains(strings.ToLower(string(logContent)), "couldn't find remote ref idontexistrabbitmonkeydonkey") &&
strings.Contains(strings.ToLower(string(logContent)), "pathspec 'idontexistrabbitmonkeydonkey' did not match any file(s) known to git") {
t.Logf("Found exepected errors when retrieving non-existent git revision")
} else {
t.Logf("Container `%s` log File: %s", stat.Name, logContent)
Expand Down

0 comments on commit 6480717

Please sign in to comment.