Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email tests fail on OpenBSD due to non-existing keyring path #388

Open
mxsasha opened this issue Sep 1, 2020 · 0 comments
Open

Email tests fail on OpenBSD due to non-existing keyring path #388

mxsasha opened this issue Sep 1, 2020 · 0 comments
Assignees
Labels
later Planned for a later time

Comments

@mxsasha
Copy link
Collaborator

mxsasha commented Sep 1, 2020

Test failure on OpenBSD, looks like a real bug in the tests, but not in live settings where the keyring path is set.

________________________ TestEmailParser.test_parse_valid_multipart_quoted_printable_without_charset ________________________

self = <irrd.utils.tests.test_email.TestEmailParser object at 0x19cc6c42c210>

    def test_parse_valid_multipart_quoted_printable_without_charset(self):
        # latin-1 will be assumed
        email = textwrap.dedent("""
        From sasha@localhost  Thu Jan  5 10:04:48 2018
        Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
          by hostname (Postfix) with ESMTPS id 740AD310597
          for <sasha@localhost>; Thu,  5 Jan 2018 10:04:48 +0100 (CET)
        Message-ID: <1325754288.4989.6.camel@hostname>
        Subject: my subject
        From: Sasha <sasha@example.com>
        To: sasha@localhost
        Date: Thu, 05 Jan 2018 10:04:48 +0100
        Content-Type: multipart/alternative;
         boundary="Apple-Mail=_01FE5B2D-C7F3-4DDD-AB42-B92C88CFBF0F"
        Mime-Version: 1.0 (Mac OS X Mail 10.3
        To: sasha@localhost
        X-Mailer: Apple Mail (2.3273)


        --Apple-Mail=_01FE5B2D-C7F3-4DDD-AB42-B92C88CFBF0F
        Content-Type: text/plain
        Content-Transfer-Encoding: quoted-printable

        se=20font =
        vite p=C3=A9dag=
        ogues


        --Apple-Mail=_01FE5B2D-C7F3-4DDD-AB42-B92C88CFBF0F
        Content-Transfer-Encoding: 7bit
        Content-Type: text/html;
            charset=us-ascii

        <html><head><meta http-equiv='Content-Type' content='text/html charset=us-ascii'></head><body style='word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;' class=""><b class="">test 1 2 3</b><div class=""><br class=""></div></body></html>
        --Apple-Mail=_01FE5B2D-C7F3-4DDD-AB42-B92C88CFBF0F--
        """).strip()
>       parser = EmailParser(email)

irrd/utils/tests/test_email.py:177:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
irrd/utils/email.py:66: in __init__
    new_body, self.pgp_fingerprint = validate_pgp_signature(self._raw_body, self._pgp_signature)
irrd/utils/pgp.py:47: in validate_pgp_signature
    gpg = get_gpg_instance()
irrd/utils/pgp.py:18: in get_gpg_instance
    if not os.path.exists(keyring):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

path = None

    def exists(path):
        """Test whether a path exists.  Returns False for broken symbolic links"""
        try:
>           os.stat(path)
E           TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

venv/lib/python3.7/genericpath.py:19: TypeError
@mxsasha mxsasha added the later Planned for a later time label Sep 14, 2020
@mxsasha mxsasha self-assigned this Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
later Planned for a later time
Projects
None yet
Development

No branches or pull requests

1 participant