... and likely other related files.
The failing disable.conf has been added to the integration
tests.
Issue:
https://redmine.openinfosecfoundation.org/issues/2551
https://redmine.openinfosecfoundation.org/issues/2549
- Fix interactive input for add-source command.
https://redmine.openinfosecfoundation.org/issues/2550
+- Python fix for loading disable.conf (and other files).
+ https://redmine.openinfosecfoundation.org/issues/2551
## 1.0.0rc1 - 2018-07-17
- Python 3 fixes.
matchers = []
for line in fileobj:
- line = line.decode().strip()
+ line = line.strip()
if not line or line.startswith("#"):
continue
line = line.rsplit(" #")[0]
common_update_args = [
"--no-test",
"--no-reload",
- "--disable-conf", "./tests/empty",
+ "--suricata-conf", "./tests/suricata.yaml",
+ "--disable-conf", "./tests/disable.conf",
"--enable-conf", "./tests/empty",
"--drop-conf", "./tests/empty",
"--modify-conf", "./tests/empty",
def test_trailing_comment(self):
"""Test loading matchers with a trailing comment."""
- matchers = main.parse_matchers(io.BytesIO("""filename: */trojan.rules
+ matchers = main.parse_matchers(io.StringIO(u"""filename: */trojan.rules
re:.# This is a comment*
1:100 # Trailing comment.
-""".encode()))
+"""))
self.assertEquals(
matchers[0].__class__, suricata.update.main.FilenameMatcher)
self.assertEquals(