/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_verify_signatures.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        wt.commit("base B", allow_pointless=True, rev_id=b'B')
42
42
        wt.commit("base C", allow_pointless=True, rev_id=b'C')
43
43
        wt.commit("base D", allow_pointless=True, rev_id=b'D',
44
 
                committer='Alternate <alt@foo.com>')
 
44
                  committer='Alternate <alt@foo.com>')
45
45
        wt.add_parent_tree_id(b"aghost")
46
46
        wt.commit("base E", allow_pointless=True, rev_id=b'E')
47
47
        return wt
52
52
        self.run_bzr('sign-my-commits')
53
53
        out = self.run_bzr('verify-signatures', retcode=1)
54
54
        self.assertEqual(('4 commits with valid signatures\n'
55
 
                           '0 commits with key now expired\n'
56
 
                           '0 commits with unknown keys\n'
57
 
                           '0 commits not valid\n'
58
 
                           '1 commit not signed\n', ''), out)
 
55
                          '0 commits with key now expired\n'
 
56
                          '0 commits with unknown keys\n'
 
57
                          '0 commits not valid\n'
 
58
                          '1 commit not signed\n', ''), out)
59
59
 
60
60
    def test_verify_signatures_acceptable_key(self):
61
61
        wt = self.setup_tree()
62
62
        self.monkey_patch_gpg()
63
63
        self.run_bzr('sign-my-commits')
64
64
        out = self.run_bzr(['verify-signatures', '--acceptable-keys=foo,bar'],
65
 
                            retcode=1)
 
65
                           retcode=1)
66
66
        self.assertEqual(('4 commits with valid signatures\n'
67
 
                           '0 commits with key now expired\n'
68
 
                           '0 commits with unknown keys\n'
69
 
                           '0 commits not valid\n'
70
 
                           '1 commit not signed\n', ''), out)
 
67
                          '0 commits with key now expired\n'
 
68
                          '0 commits with unknown keys\n'
 
69
                          '0 commits not valid\n'
 
70
                          '1 commit not signed\n', ''), out)
71
71
 
72
72
    def test_verify_signatures_verbose(self):
73
73
        wt = self.setup_tree()