diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2022-10-20 22:20:18 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-10-26 12:32:08 +0100 |
commit | cba4d320dc410ab68d01caab8fbc72bda80c27db (patch) | |
tree | fe8bd47303721f2eaa755aa8848ed46aba2111e6 /bitbake | |
parent | f67176aadac0eee3fd8f410c03238acd23b38a36 (diff) | |
download | poky-cba4d320dc410ab68d01caab8fbc72bda80c27db.tar.gz |
bitbake: tests: bb.tests.fetch.URLHandle: add 2 new tests
Add a test for special characters in user and password to qualify
decodeurl() inspired by a bug report describing that '=' signs in a
password was problematic.
Add a second test to qualify decodeurl() as related to the change in
commit 628c4bf6c89b [fetch2/__init__: handle @ in package names].
Relates to [YOCTO #14476]
(Bitbake rev: ee04cf09c7022168c035affa654773652a49793e)
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index b4ed691f33..c5f6ce9dab 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -1331,12 +1331,14 @@ class URLHandle(unittest.TestCase): | |||
1331 | "cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', collections.OrderedDict([('tag', 'V0-99-81'), ('module', 'familiar/dist/ipkg')])), | 1331 | "cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', collections.OrderedDict([('tag', 'V0-99-81'), ('module', 'familiar/dist/ipkg')])), |
1332 | "git://git.openembedded.org/bitbake;branch=@foo" : ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'}), | 1332 | "git://git.openembedded.org/bitbake;branch=@foo" : ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'}), |
1333 | "file://somelocation;someparam=1": ('file', '', 'somelocation', '', '', {'someparam': '1'}), | 1333 | "file://somelocation;someparam=1": ('file', '', 'somelocation', '', '', {'someparam': '1'}), |
1334 | r'git://s.o-me_ONE:!#$%^&*()-_={}[]\|:?,.<>~`@git.openembedded.org/bitbake;branch=main': ('git', 'git.openembedded.org', '/bitbake', 's.o-me_ONE', r'!#$%^&*()-_={}[]\|:?,.<>~`', {'branch': 'main'}), | ||
1334 | } | 1335 | } |
1335 | # we require a pathname to encodeurl but users can still pass such urls to | 1336 | # we require a pathname to encodeurl but users can still pass such urls to |
1336 | # decodeurl and we need to handle them | 1337 | # decodeurl and we need to handle them |
1337 | decodedata = datatable.copy() | 1338 | decodedata = datatable.copy() |
1338 | decodedata.update({ | 1339 | decodedata.update({ |
1339 | "http://somesite.net;someparam=1": ('http', 'somesite.net', '/', '', '', {'someparam': '1'}), | 1340 | "http://somesite.net;someparam=1": ('http', 'somesite.net', '/', '', '', {'someparam': '1'}), |
1341 | "npmsw://some.registry.url;package=@pkg;version=latest": ('npmsw', 'some.registry.url', '/', '', '', {'package': '@pkg', 'version': 'latest'}), | ||
1340 | }) | 1342 | }) |
1341 | 1343 | ||
1342 | def test_decodeurl(self): | 1344 | def test_decodeurl(self): |