MCPcopy Create free account
hub / github.com/go-git/go-git / TestEncodeWithoutSignature

Method TestEncodeWithoutSignature

plumbing/object/commit_test.go:536–554  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

534}
535
536func (s *SuiteCommit) TestEncodeWithoutSignature(c *C) {
537 // Similar to TestString since no signature
538 encoded := &plumbing.MemoryObject{}
539 err := s.Commit.EncodeWithoutSignature(encoded)
540 c.Assert(err, IsNil)
541 er, err := encoded.Reader()
542 c.Assert(err, IsNil)
543 payload, err := io.ReadAll(er)
544 c.Assert(err, IsNil)
545
546 c.Assert(string(payload), Equals, ""+
547 "tree eba74343e2f15d62adedfd8c883ee0262b5c8021\n"+
548 "parent 35e85108805c84807bc66a02d91535e1e24b38b9\n"+
549 "parent a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69\n"+
550 "author Máximo Cuadros Ortiz <mcuadros@gmail.com> 1427802494 +0200\n"+
551 "committer Máximo Cuadros Ortiz <mcuadros@gmail.com> 1427802494 +0200\n"+
552 "\n"+
553 "Merge branch 'master' of github.com:tyba/git-fixture\n")
554}
555
556func (s *SuiteCommit) TestLess(c *C) {
557 when1 := time.Now()

Callers

nothing calls this directly

Calls 2

ReaderMethod · 0.95

Tested by

no test coverage detected