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

TestReverseDnsExpertBot.test_invalid_ptr fails because of DNS entry change #2206

Closed
wagner-intevation opened this issue Jul 5, 2022 · 0 comments · Fixed by #2208
Closed
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component: tests
Milestone

Comments

@wagner-intevation
Copy link
Contributor

_________________________________________________________________________________________________ TestReverseDnsExpertBot.test_invalid_ptr __________________________________________________________________________________________________

self = <intelmq.tests.bots.experts.reverse_dns.test_expert.TestReverseDnsExpertBot testMethod=test_invalid_ptr>

    def test_invalid_ptr(self):
        self.input_message = INVALID_PTR_INP
        self.run_bot()
>       self.assertMessageEqual(0, INVALID_PTR_OUT)

intelmq/tests/bots/experts/reverse_dns/test_expert.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
intelmq/lib/test.py:563: in assertMessageEqual
    self.assertDictEqual(expected, event_dict)
E   AssertionError: {'__type': 'Event', 'source.ip': '31.210.115.39'} != {'source.ip': '31.210.115.39', 'source.reve[47 chars]ent'}
E   - {'__type': 'Event', 'source.ip': '31.210.115.39'}
E   + {'__type': 'Event',
E   +  'source.ip': '31.210.115.39',
E   +  'source.reverse_dns': 'show.generoustek.com'}

Finding a replacement IP address is probably very hard, so the only choice we have is to remove the test or to mock the DNS query.

@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: tests labels Jul 5, 2022
@sebix sebix added this to the 3.1.0 milestone Jul 5, 2022
sebix pushed a commit that referenced this issue Jul 5, 2022
remove test_invalid_ptr as the IP address used no longer returns the
expected result

fixes #2206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants