Skip to content

Commit

Permalink
tests: git error message differs in os
Browse files Browse the repository at this point in the history
```
Expected
  <string>: "...tal: path '..."
to equal               |
  <string>: "...tal: Path '..."
```
  • Loading branch information
alexey-igrychev committed Sep 15, 2021
1 parent e95f78d commit 1861ec4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/true_git/service_branch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,10 @@ var _ = Describe("SyncSourceWorktreeWithServiceBranch", func() {
"git",
"show", serviceCommit+":"+trackedFileRelPath,
)

Ω(err).Should(HaveOccurred())
Ω(string(bytes)).Should(Equal(fmt.Sprintf("fatal: Path '%s' does not exist in '%s'\n", trackedFileRelPath, serviceCommit)))

output := string(bytes)
Ω(output).Should(ContainSubstring(fmt.Sprintf("'%s' does not exist in '%s'", trackedFileRelPath, serviceCommit)))
})
})
})
Expand Down Expand Up @@ -309,9 +310,10 @@ var _ = Describe("SyncSourceWorktreeWithServiceBranch", func() {
"git",
"show", serviceCommit+":"+untrackedFileRelPath,
)

Ω(err).Should(HaveOccurred())
Ω(string(bytes)).Should(Equal(fmt.Sprintf("fatal: Path '%s' exists on disk, but not in '%s'.\n", untrackedFileRelPath, serviceCommit)))

output := string(bytes)
Ω(output).Should(ContainSubstring(fmt.Sprintf("'%s' exists on disk, but not in '%s'", untrackedFileRelPath, serviceCommit)))
})
})
})

0 comments on commit 1861ec4

Please sign in to comment.