vmagamedov / grpclib

Pure-Python gRPC implementation for asyncio
http://grpclib.readthedocs.io
BSD 3-Clause "New" or "Revised" License
938 stars 91 forks source link

The test test_default_ssl_context is failing #173

Closed benallard closed 1 year ago

benallard commented 1 year ago

Hi, I'm packaging grpclib for AUR (archlinux), and the one test is failing, both certificates bundle are the same, is that wrong ?

E       AssertionError: assert [b'0\x82\x03\xa80\x82\x02\x90\xa0\x03\x02\x01\x02\x02\t\x00\xfe\xdc\xe3\x01\x0f\xc9H\xff0\r\x06\t*\x86H\x86\xf7\r\x01\...8\xc4\x02!\x00\x9c\x02\xef\xf1\x94\x9c\xb3\x96\xf9\xeb\xc6*\xf8\xb6,\xfe:\x90\x14\x16\xd7\x8cc$H\x1c\xdf0}\xd5h;', ...] != [b'0\x82\x03\xa80\x82\x02\x90\xa0\x03\x02\x01\x02\x02\t\x00\xfe\xdc\xe3\x01\x0f\xc9H\xff0\r\x06\t*\x86H\x86\xf7\r\x01\...8\xc4\x02!\x00\x9c\x02\xef\xf1\x94\x9c\xb3\x96\xf9\xeb\xc6*\xf8\xb6,\xfe:\x90\x14\x16\xd7\x8cc$H\x1c\xdf0}\xd5h;', ...]
vmagamedov commented 1 year ago

I can reproduce this error by uninstalling certify package. Looks like this is the reason.

requirements/test.txt – here you can find all dependencies we use in our CI (generated from test.in file). certify is an optional dependency for grpclib.

benallard commented 1 year ago

Thanks for the response, and while that's true that I didn't had the dependency explicitely defined, it is actually already installed locally, so it is used during the test.

Any idea what I could do to better investigate what's going wrong?

benallard commented 1 year ago

BTW, you probably meant certifi, right ?

vmagamedov commented 1 year ago

Yes, sorry, I meant certifi.

both certificates bundle are the same, is that wrong ?

Now I understand why: https://github.com/archlinux/svntogit-community/blob/b3ceca5fbdaa67dcb252d78bd210ebf65dff194f/trunk/PKGBUILD#L45

This isn't wrong, this is just unexpected. So this test should be fixed or there should be ability to skip this test.

vmagamedov commented 1 year ago

Fixed test in 90eb869e4031f6705263d6cd4c65c5b70c303919

benallard commented 1 year ago

The patch is working. Thanks!