<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dear Václav,</p>
<p>Which harmonization file did you change?<br>
</p>
<p>The test library loads the harmonization config from the package
itself:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/certtools/intelmq/blob/ac6aa4e306b1431b6db89158e25ed4c2c5a356bd/intelmq/lib/test.py#L190-L191">https://github.com/certtools/intelmq/blob/ac6aa4e306b1431b6db89158e25ed4c2c5a356bd/intelmq/lib/test.py#L190-L191</a></p>
<p> harmonization =
utils.load_configuration(pkg_resources.resource_filename('intelmq',<br>
'etc/harmonization.conf'))</p>
<p>best regards<br>
Sebastian<br>
</p>
<pre class="moz-signature" cols="72">Institute for Common Good Technology
gemeinnütziger Kulturverein - nonprofit cultural society
<a class="moz-txt-link-freetext" href="https://commongoodtechnology.org/">https://commongoodtechnology.org/</a>
ZVR 1510673578</pre>
<div class="moz-cite-prefix">On 2/28/24 08:39, Vaclav Bruzek wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAAQS+Tc2q9NxaxiUhmwyZPAsGFdvat=HrzMDaQzk15XOo=EajQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Dear IntelMQ Developers & Users,
<div>I'm trying to incorporate my custom fields in Events and
Reports as well as test cases for my custom bots in unit
tests. What I¨m still encountering is that the Github actions
are failing since my custom fields in harmonization are not
known. I've added step which should create the harmonization
file in /opt/intelmq/etc/ like so which is the only change to
the action:</div>
<div><br>
</div>
<div> - name: Include custom harmonization names<br>
run: mkdir -p /opt/intelmq/etc/ && cp
docker/fast/harmonization.conf /opt/intelmq/etc/<br>
</div>
<div><br>
</div>
<div>However, intelmq still falls back to the default one. If I
try to run
manually load_configuration("/opt/intelmq/etc/harmonization.conf")
the correct result is displayed.</div>
<div><br>
</div>
<div>Does anybody know how to supply the custom configuration to
unit tests?</div>
<div><br clear="all">
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Sincerely,
<div>Václav Brůžek</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
</body>
</html>