diff options
author | Paul T <paul.t@gembaadvantage.com> | 2021-12-15 06:31:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 06:31:49 +0000 |
commit | 53a714bdc90026135e2f2ada1c4d6c925b2733cd (patch) | |
tree | 1fe7dc9f5974bc6e5a65e805b96e3a36be3f573e /common_test.go | |
parent | aba274ca7daf59d07d9559e6f99ca18ef0b78c7b (diff) | |
parent | f0b111ab70e4e90013658b0835929b2083902017 (diff) | |
download | go-git-53a714bdc90026135e2f2ada1c4d6c925b2733cd.tar.gz |
Merge branch 'go-git:master' into master
Diffstat (limited to 'common_test.go')
-rw-r--r-- | common_test.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/common_test.go b/common_test.go index 5f5bc4c..c0c4009 100644 --- a/common_test.go +++ b/common_test.go @@ -7,7 +7,6 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/plumbing/format/packfile" - "github.com/go-git/go-git/v5/plumbing/transport" "github.com/go-git/go-git/v5/storage/filesystem" "github.com/go-git/go-git/v5/storage/memory" @@ -25,8 +24,7 @@ type BaseSuite struct { fixtures.Suite Repository *Repository - backupProtocol transport.Transport - cache map[string]*Repository + cache map[string]*Repository } func (s *BaseSuite) SetUpSuite(c *C) { @@ -198,3 +196,11 @@ func AssertReferences(c *C, r *Repository, expected map[string]string) { c.Assert(obtained, DeepEquals, expected) } } + +func AssertReferencesMissing(c *C, r *Repository, expected []string) { + for _, name := range expected { + _, err := r.Reference(plumbing.ReferenceName(name), false) + c.Assert(err, NotNil) + c.Assert(err, Equals, plumbing.ErrReferenceNotFound) + } +} |