(c *C)
| 751 | } |
| 752 | |
| 753 | func (s *SuiteCommit) TestEncodeWithoutSignature(c *C) { |
| 754 | tests := []struct { |
| 755 | name string |
| 756 | commitRaw string |
| 757 | mutate func(*Commit) |
| 758 | expected string |
| 759 | }{ |
| 760 | { |
| 761 | name: "commit without signature", |
| 762 | commitRaw: `tree eba74343e2f15d62adedfd8c883ee0262b5c8021 |
| 763 | parent 35e85108805c84807bc66a02d91535e1e24b38b9 |
| 764 | parent a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69 |
| 765 | author Máximo Cuadros Ortiz <mcuadros@gmail.com> 1427802494 +0200 |
| 766 | committer Máximo Cuadros Ortiz <mcuadros@gmail.com> 1427802494 +0200 |
| 767 | |
| 768 | Merge branch 'master' of github.com:tyba/git-fixture |
| 769 | `, |
| 770 | expected: `tree eba74343e2f15d62adedfd8c883ee0262b5c8021 |
| 771 | parent 35e85108805c84807bc66a02d91535e1e24b38b9 |
| 772 | parent a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69 |
| 773 | author Máximo Cuadros Ortiz <mcuadros@gmail.com> 1427802494 +0200 |
| 774 | committer Máximo Cuadros Ortiz <mcuadros@gmail.com> 1427802494 +0200 |
| 775 | |
| 776 | Merge branch 'master' of github.com:tyba/git-fixture |
| 777 | `, |
| 778 | }, |
| 779 | { |
| 780 | name: "commit with change-id and gpgsig", |
| 781 | commitRaw: `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
| 782 | author John Doe <john.doe@example.com> 1755280730 -0700 |
| 783 | committer John Doe <john.doe@example.com> 1755280730 -0700 |
| 784 | change-id wxmuynokkzxmuwxwvnnpnptoyuypknwv |
| 785 | gpgsig -----BEGIN PGP SIGNATURE----- |
| 786 | iHUEABMIAB0WIQSZpnSpGKbQbDaLe5iiNQl48cTY5gUCaJ91XQAKCRCiNQl48cTY |
| 787 | 5vCYAP9Sf1yV9oUviRIxEA+4rsGIx0hI6kqFajJ/3TtBjyCTggD+PFnKOxdXeFL2 |
| 788 | GLwcCzFIsmQmkLxuLypsg+vueDSLpsM= |
| 789 | =VucY |
| 790 | -----END PGP SIGNATURE----- |
| 791 | |
| 792 | initial commit |
| 793 | |
| 794 | Change-Id: I6a6a696432d51cbff02d53234ccaca6b151afc34 |
| 795 | `, |
| 796 | expected: `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
| 797 | author John Doe <john.doe@example.com> 1755280730 -0700 |
| 798 | committer John Doe <john.doe@example.com> 1755280730 -0700 |
| 799 | change-id wxmuynokkzxmuwxwvnnpnptoyuypknwv |
| 800 | |
| 801 | initial commit |
| 802 | |
| 803 | Change-Id: I6a6a696432d51cbff02d53234ccaca6b151afc34 |
| 804 | `, |
| 805 | }, |
| 806 | { |
| 807 | name: "gpgsig-sha256", |
| 808 | commitRaw: `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
| 809 | author John Doe <john.doe@example.com> 1755280730 -0700 |
| 810 | committer John Doe <john.doe@example.com> 1755280730 -0700 |
nothing calls this directly
no test coverage detected