[IntelMQ-dev] Odd intelmqdump testing errors
Kamil Mankowski
mankowski at cert.at
Wed May 24 09:02:52 CEST 2023
I'd say that the IntelMQ test setup isn't unfortunately fully isolated
by default. From my experience, I recommend setting the
'INTELMQ_ROOT_DIR' environmental variable for tests and dev environments
to separated directories, others than the default one. Then they should
be basically isolated. However, still the leftover dumps can interfere,
but at least not between envs.
Best regards,
Kamil Mankowski
CERT.at GmbH
www.cert.at
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/
> _______________________________________________
> IntelMQ-dev mailing list
> https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev
> https://intelmq.readthedocs.io/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cert.at/pipermail/intelmq-dev/attachments/20230524/436c87fd/attachment.sig>
More information about the IntelMQ-dev
mailing list