[IntelMQ-dev] Odd intelmqdump testing errors

Sebix sebix at sebix.at
Fri May 26 10:06:40 CEST 2023


I agree with Kamil that this a bug in the tests, not in the system 
running the tests.

Not only test_list_and_select_dump_from_custom_location is affected, but 
9 test cases related to the intelmqctl and intelmqdump tool: 
https://github.com/certtools/intelmq/issues/2369

A fix (workaround) is in https://github.com/certtools/intelmq/pull/2370 
which disables these tests by default, they can be activated with 
INTELMQ_TEST_INSTALLATION=1 (active in the GitHub workflow)

best regards
Sebastian

Institute for Common Good Technology
gemeinnütziger Kulturverein - nonprofit cultural society
https://sebix.at/
ZVR 1510673578

On 5/24/23 08:56, Mika Silander wrote:
> Hi Sebastian,
>
>   Thanks for the hint. Apparently the removal of existing dump files helped and I was left with test failures of mostly my own components. The fact that an existing installation's dump files may interfere with building the deb package, I take this as an indirect suggestion to always build the package in a vanilla system or rely on a separate CI/CD environment, right?
>
> Br, Mika
>
> ----- Original Message -----
> From: "Sebix" <sebix at sebix.at>
> To: "Mika Silander" <mika.silander at csc.fi>, "intelmq-dev" <intelmq-dev at lists.cert.at>
> Sent: Tuesday, 23 May, 2023 15:09:32
> Subject: Re: [IntelMQ-dev] Odd intelmqdump testing errors
>
> Dear Mika,
>
> Either that or it's much simpler.
>
> When you call intelmqdump, you get a list of bots/dump files, formatted
> as a table with some columns. Could there be some dumps lying around in
> the system locally, that the test picks up? That would explain why the
> columns are so wide.
>
> For debugging you could also look a the complete value of the `output`
> variable in that test case.
>
> If it's not that, then it could be a change in the library composing the
> table, but as your system is not brand-new, I consider this less likely.
>
> best regards
> Sebastian
>
> Institute for Common Good Technology
> gemeinnütziger Kulturverein - nonprofit cultural society
> https://sebix.at/
> ZVR 1510673578
>
> On 5/23/23 11:47, Mika Silander wrote:
>> Hi all,
>>
>>    Running the entire unit test suite of intelmq I come across a few test failures which make me ponder whether my development environment is out of sync or outdated. Tests on intelmqdump fail in the following manner:
>>
>> --
>>
>> FAIL: test_list_and_select_dump_from_custom_location (intelmq.tests.bin.test_intelmqdump.TestIntelMQDump) [0]
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>     File "/opt/my_development/intelmq/intelmq/tests/bin/test_intelmqdump.py", line 165, in test_list_and_select_dump_from_custom_location
>>       self.assertIn("0: test-1 empty file", output[1])
>> AssertionError: '0: test-1 empty file' not found in '  0: test-1                            empty file'
>>
>> --
>>
>>     So, the assertion string looks "almost" what is expected. Can this be an old(er) python library issue or something?
>> Currently I develop on Ubuntu 20.04.6 LTS, using python 3.8.10 and the intelmqdump sources tested are from the intelmq-github/develop branch, commit tag 0780ee5c1281da8a6defcdd8f8c4722ccdbee4e8.
>>
>> Br, Mika
>> _______________________________________________
>> IntelMQ-dev mailing list
>> https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev
>> https://intelmq.readthedocs.io/


More information about the IntelMQ-dev mailing list