mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
bitbake: tests: utils: add test for Go mod h1 checksum
Add a basic test for the goh1_file function. (Bitbake rev: 3dc4d28a9eed962876c148dbe69d9f521bf42287) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f00e8e1233
commit
e223f6635a
|
@ -130,6 +130,14 @@ class Checksum(unittest.TestCase):
|
|||
checksum = bb.utils.sha256_file(f.name)
|
||||
self.assertEqual(checksum, "fcfbae8bf6b721dbb9d2dc6a9334a58f2031a9a9b302999243f99da4d7f12d0f")
|
||||
|
||||
def test_goh1(self):
|
||||
import hashlib
|
||||
with tempfile.NamedTemporaryFile() as f:
|
||||
f.write(self.filler)
|
||||
f.flush()
|
||||
checksum = bb.utils.goh1_file(f.name)
|
||||
self.assertEqual(checksum, "81191f04d4abf413e5badd234814e4202d9efa73e6f9437e9ddd6b8165b569ef")
|
||||
|
||||
class EditMetadataFile(unittest.TestCase):
|
||||
_origfile = """
|
||||
# A comment
|
||||
|
|
Loading…
Reference in New Issue
Block a user