<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dear Mika,</p>
<p>These two tests are known to fail in build environments. I guess
that their intentional limitations on networking cause some
troubles here, but I don't know the exact reason. Therefore we
skip these two tests in such environments (see the two links) but
a local build with dpkg-buildpackage is obviously not covered yet
by that logic.</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/tests/bots/collectors/tcp/test_collector.py#L68">https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/tests/bots/collectors/tcp/test_collector.py#L68</a><br>
<a class="moz-txt-link-freetext" href="https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/lib/test.py#L102">https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/lib/test.py#L102</a></p>
<p>Do you know if there's some env variable set which we could check
on? Then we can add that to the <span class="pl-en"><span
class="pl-token active"
data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":21160389,"ref":"5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080","language":"Python","originating_url":"https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/lib/test.py","user_id":25031221}}"
data-hydro-click-hmac="b35a9abd0508050affd815ba192d9cb3fbe46b618fb0c58f10c6ff04516b3bdd">skip_build_environment
definition.</span></span></p>
<p><span class="pl-en"><span class="pl-token active"
data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":21160389,"ref":"5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080","language":"Python","originating_url":"https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/lib/test.py","user_id":25031221}}"
data-hydro-click-hmac="b35a9abd0508050affd815ba192d9cb3fbe46b618fb0c58f10c6ff04516b3bdd">Hope
that helps</span></span></p>
<p><span class="pl-en"><span class="pl-token active"
data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":21160389,"ref":"5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080","language":"Python","originating_url":"https://github.com/certtools/intelmq/blob/5962fa9efb1c9d1ae454cc85d4aa05ddfe3d1080/intelmq/lib/test.py","user_id":25031221}}"
data-hydro-click-hmac="b35a9abd0508050affd815ba192d9cb3fbe46b618fb0c58f10c6ff04516b3bdd">Sebastian<br>
</span></span></p>
<div class="moz-cite-prefix">On 10/5/21 10:55 AM, Mika Silander
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:551416591.4228286.1633424129173.JavaMail.zimbra@csc.fi">
<pre class="moz-quote-pre" wrap="">Hi,
Tried building the intelmq debian packages on a Ubuntu 18 LTS, python 3.6 with
dpkg-buildpackage -us -uc -b -d
Branch was maintenance, tag 3.0.2 and the option -d above was added because Cerberus 1.3.2 was installed with pip3
and not with apt from python3-cerberus. Seems two tests make the build fail, see below.
A known problem? Any hints for troubleshooting this? Airing this here before starting to debug on my own ...
Cheers, Mika
======================================================================
FAIL: test_multiple_bots (intelmq.tests.bots.collectors.tcp.test_collector.TestTCPCollectorBot)
Let's simulate multiple IntelMQ instances are pushing the events at once!
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mika/intelmq/intelmq/tests/bots/collectors/tcp/test_collector.py", line 175, in test_multiple_bots
self.run_bot(iterations=client_count + 1)
File "/home/mika/intelmq/intelmq/lib/test.py", line 361, in run_bot
self.assertLessEqual(len(re.findall(' - ERROR - ', self.loglines_buffer)), allowed_error_count)
AssertionError: 2 not less than or equal to 0
======================================================================
FAIL: test_random_input (intelmq.tests.bots.collectors.tcp.test_collector.TestTCPCollectorBot)
Check how we handle a random input, coming from an unknown source. We should put all the data to report['raw'].
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mika/intelmq/intelmq/tests/bots/collectors/tcp/test_collector.py", line 106, in test_random_input
self.run_bot()
File "/home/mika/intelmq/intelmq/lib/test.py", line 363, in run_bot
self.assertLessEqual(len(re.findall(' - WARNING - ', self.loglines_buffer)), allowed_warning_count)
AssertionError: 1 not less than or equal to 0
----------------------------------------------------------------------
Ran 1404 tests in 125.121s
FAILED (failures=2, skipped=274)
Test failed: <unittest.runner.TextTestResult run=1404 errors=0 failures=2>
error: Test failed: <unittest.runner.TextTestResult run=1404 errors=0 failures=2>
E: pybuild pybuild:336: test: plugin distutils failed with: exit code=1: python3.6 setup.py test
dh_auto_test: pybuild --test -i python{version} -p 3.6 returned exit code 13
debian/rules:23: recipe for target 'build' failed
make: *** [build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
_______________________________________________
IntelMQ-dev mailing list
<a class="moz-txt-link-freetext" href="https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev">https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev</a>
<a class="moz-txt-link-freetext" href="https://intelmq.readthedocs.io/">https://intelmq.readthedocs.io/</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
// Sebastian Wagner <a class="moz-txt-link-rfc2396E" href="mailto:wagner@cert.at"><wagner@cert.at></a> - T: +43 676 898 298 7201
// CERT Austria - <a class="moz-txt-link-freetext" href="https://www.cert.at/">https://www.cert.at/</a>
// Eine Initiative der nic.at GmbH - <a class="moz-txt-link-freetext" href="https://www.nic.at/">https://www.nic.at/</a>
// Firmenbuchnummer 172568b, LG Salzburg</pre>
</body>
</html>