aboutsummaryrefslogtreecommitdiffstats
path: root/submodule_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-26 06:24:47 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-26 06:24:47 +0200
commit064051f972e90dd55e6c941f04b58b4a36dfedf1 (patch)
treec535025453602cfa561d3622c78dc37693f55c82 /submodule_test.go
parentfbf2a4ab4588c78e3d9d0265dba774ae6b388b5f (diff)
downloadgo-git-064051f972e90dd55e6c941f04b58b4a36dfedf1.tar.gz
*: package context support in Repository, Remote and Submodule
Diffstat (limited to 'submodule_test.go')
-rw-r--r--submodule_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/submodule_test.go b/submodule_test.go
index b398664..dd797c5 100644
--- a/submodule_test.go
+++ b/submodule_test.go
@@ -1,6 +1,7 @@
package git
import (
+ "context"
"io/ioutil"
"os"
"path/filepath"
@@ -190,3 +191,14 @@ func (s *SubmoduleSuite) TestSubmodulesStatus(c *C) {
c.Assert(err, IsNil)
c.Assert(status, HasLen, 2)
}
+
+func (s *SubmoduleSuite) TestSubmodulesUpdateContext(c *C) {
+ sm, err := s.Worktree.Submodules()
+ c.Assert(err, IsNil)
+
+ ctx, cancel := context.WithCancel(context.Background())
+ cancel()
+
+ err = sm.UpdateContext(ctx, &SubmoduleUpdateOptions{Init: true})
+ c.Assert(err, NotNil)
+}