From 064051f972e90dd55e6c941f04b58b4a36dfedf1 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Wed, 26 Jul 2017 06:24:47 +0200 Subject: *: package context support in Repository, Remote and Submodule --- submodule_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'submodule_test.go') 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) +} -- cgit