Fix test_ensure_cloned and JWT tests
This is two changes in one since they both fix breakage due to
external dep changes:
Git no longer allows file urls in submodules by default, but one
of our unit tests relied on that behavior (in order to verify that
we can clone repos with submodules). Run the submodule add command
in the test with a flag which allows file urls.
Pin PyJWT <2.6.0
2.6.0 causes the following error:
2022-10-20 15:58:04,800 cherrypy.error.140001002710128 ERROR [req: 86efa7775e88473a9e9d5e54f0c83050] [20/Oct/2022:15:58:04] HTTP
Traceback (most recent call last):
File "/home/corvus/git/zuul/zuul/.tox/py310/lib/python3.10/site-packages/cherrypy/_cprequest.py", line 638, in respond
self._do_respond(path_info)
File "/home/corvus/git/zuul/zuul/.tox/py310/lib/python3.10/site-packages/cherrypy/_cprequest.py", line 702, in _do_respond
response.finalize()
File "/home/corvus/git/zuul/zuul/.tox/py310/lib/python3.10/site-packages/cherrypy/_cprequest.py", line 901, in finalize
content = self.collapse_body()
File "/home/corvus/git/zuul/zuul/.tox/py310/lib/python3.10/site-packages/cherrypy/_cprequest.py", line 859, in collapse_body
new_body = b''.join(self.body)
File "/home/corvus/git/zuul/zuul/.tox/py310/lib/python3.10/site-packages/cherrypy/_json.py", line 24, in encode
for chunk in _encode(value):
File "/usr/lib/python3.10/json/encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/usr/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.10/json/encoder.py", line 438, in _iterencode
o = _default(o)
File "/usr/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ImmatureSignatureError is not JSON serializable
Change-Id: I2e345f24ea0a62ce8d9dbe1c066438f194e7075c
This commit is contained in:
@@ -23,7 +23,7 @@ alembic
|
||||
cryptography>=1.6
|
||||
cachecontrol<0.12.7
|
||||
cachetools
|
||||
pyjwt>=2.0.0,<3.0
|
||||
pyjwt>=2.0.0,<2.6.0
|
||||
iso8601
|
||||
psutil
|
||||
fb-re2>=1.0.6
|
||||
|
||||
@@ -71,8 +71,11 @@ class TestMergerRepo(ZuulTestCase):
|
||||
|
||||
# Forge a repo having a submodule
|
||||
parent_repo = git.Repo(parent_path)
|
||||
parent_repo.git.submodule('add', os.path.join(
|
||||
self.upstream_root, 'org/project2'), 'subdir')
|
||||
parent_repo.git(c='protocol.file.allow=always').submodule(
|
||||
'add',
|
||||
os.path.join(self.upstream_root, 'org/project2'),
|
||||
'subdir')
|
||||
|
||||
parent_repo.index.commit('Adding project2 as a submodule in subdir')
|
||||
# git 1.7.8 changed .git from being a directory to a file pointing
|
||||
# to the parent repository /.git/modules/*
|
||||
|
||||
Reference in New Issue
Block a user