Skip to content

Commit

Permalink
tst: fix reverse_dns test
Browse files Browse the repository at this point in the history
remove test_invalid_ptr as the IP address used no longer returns the
expected result

fixes #2206
  • Loading branch information
wagner-intevation committed Jul 5, 2022
1 parent 79cae29 commit 7969687
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ CHANGELOG
- Also test on Python 3.10 (PR#2140 by Sebastian Wagner).
- Switch from nosetests to pytest, as the former does not support Python 3.10 (PR#2140 by Sebastian Wagner).
- CodeQL Github Actions `exponential backtracking on strings` fixed. (PR#2148 by Sebastian Waldbauer, fixes #2138)
- Reverse DNS expert tests: remove outdated failing test `test_invalid_ptr` (PR#2208 by Sebastian Wagner, fixes #2206).

### Tools
- `intelmqctl`: fix process manager initialization if run non-interactively, as intelmqdump does it (PR#2189 by Sebastian Wagner, fixes 2188).
Expand Down
13 changes: 0 additions & 13 deletions intelmq/tests/bots/experts/reverse_dns/test_expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@
"source.reverse_dns": "iana.org",
"time.observation": "2015-01-01T00:00:00+00:00",
}
INVALID_PTR_INP = {"__type": "Event",
"source.ip": "31.210.115.39", # PTR is '.'
"time.observation": "2015-01-01T00:00:00+00:00",
}
INVALID_PTR_OUT = {"__type": "Event",
"source.ip": "31.210.115.39",
"time.observation": "2015-01-01T00:00:00+00:00",
}
INVALID_PTR_INP2 = {"__type": "Event",
"source.ip": "5.157.80.221", # PTR is '5.157.80.221.' and 'aliancys.peopleinc.nl.'
"time.observation": "2015-01-01T00:00:00+00:00",
Expand Down Expand Up @@ -82,11 +74,6 @@ def test_ipv6_lookup(self):
self.run_bot()
self.assertMessageEqual(0, EXAMPLE_OUTPUT6)

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

def test_invalid_ptr2(self):
self.input_message = INVALID_PTR_INP2
self.run_bot()
Expand Down

0 comments on commit 7969687

Please sign in to comment.