Closed mattias-p closed 9 months ago
@mattias-p, @tgreenx I’ve just pushed a commit onto this branch that also fixes some of the messages generated by Delegation01. I’ve tested this change on Rocky Linux 9.3 with PostgreSQL, MariaDB and MySQL, and I can confirm that the affected messages are correctly migrated.
However, as I also said in the commit message: I’m zipping together the list of names and the list of IPs, even though, according to zonemaster/zonemaster#1203, the names and IPs might not match. But I think it’s better to have mismatched names and IPs in the migrated messages, rather than messages having unfilled placeholders.
Shouldn’t we merge this PR?
Purpose
This PR fixes translation of message strings in reports of test results that have been migrated from the previous version of the database schema.
Context
This problem was found while release testing v2023.2. The problem is described as item 3 in https://github.com/zonemaster/zonemaster-backend/pull/1092#issuecomment-1892265157.
Changes
The migration script is updated to save module and test case names the way zm-rpcapi expects to find them.
How to test this PR
age_reuse_previous_test = 60
for good measure.zmtest nu > $HOME/$db-nu.old.result
and save the test id as $test_id_nu.zmtest SE. > $HOME/$db-se.old.result
and save the test id as $test_id_se.sudo systemctl stop zm-rpcapi zm-testagent
.sudo cpanm --notest $HOME/new/*
.sudo perl $(perl -MFile::ShareDir=dist_dir -E 'say dist_dir("Zonemaster-Backend")')/patch/patch_db_zonemaster_backend_ver_11.0.3.pl
.sudo systemctl start zm-rpcapi zm-testagent
.zmb get_test_results --lang en --test-id $test_id_nu | jq -S > $HOME/$db-nu.migrated.result
.zmb get_test_results --lang en --test-id $test_id_se | jq -S > $HOME/$db-se.migrated.result
.zmtest nu > $HOME/$db-nu.new.result
.zmtest SE. > $HOME/$db-se.new.result
.