aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-07-21 06:05:19 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2019-07-29 17:32:34 +0200
commit172a0d8a0e1e05d0bc47df09d50fb8ef49529f5f (patch)
tree91d8f762673d2dd5ced806c0d59197db62494a83 /worktree_test.go
parentaf46dd50e9e0bea569449c4a70fc9217594cb2ba (diff)
downloadgo-git-172a0d8a0e1e05d0bc47df09d50fb8ef49529f5f.tar.gz
*: added missing error checks in tests
When we assign a value to err, make sure to also check for it being nil afterwards. If those were intentionally unchecked, we should remove the assignment in the first place. Those checks certainly never harm, but please review thoroughly and let me know. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit 19d6f42a4d814a50bd262fbb69a9b670db9756a2)
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/worktree_test.go b/worktree_test.go
index 045a76d..1f87957 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -1675,6 +1675,7 @@ func (s *WorktreeSuite) TestClean(c *C) {
// Status before cleaning.
status, err := wt.Status()
+ c.Assert(err, IsNil)
c.Assert(len(status), Equals, 2)
err = wt.Clean(&CleanOptions{})