CI Script: Check if Issuer Country is set
SchulzeStTSI opened this issue · 3 comments
Please insert a checkup function which checks if the issuing country is correctly set and follows iso standard.
@SchulzeStTSI I assume issuing country is cbor claim key1?
- Cbor claim key 1 from 2.6.3 Common Payload Values in https://ec.europa.eu/health/sites/default/files/ehealth/docs/digital-green-certificates_v3_en.pdf
- [r/v/t]/is from Certificate type specific information in https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_json_specification_en.pdf
@mkubicek-dtc Yes CBOR Claim Key one. It should be set to the right ISO code matching to the uploading folder. the field "co" within the certificate should be just a valid iso code, because this country can be a different one as the issuing country.
Implemented, but if merged, will fail 4 DCCs:
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\EL\1.0.0\REC.png] - AssertionError: assert 'EL' == 'GR'
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\EL\1.0.0\TEST.png] - AssertionError: assert 'EL' == 'GR'
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\EL\1.0.0\VAC.png] - AssertionError: assert 'EL' == 'GR'
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\FR\1.3.0\VAC.png] - AssertionError: assert 'FR' == 'CNAM'
FAILED tests/test_qrqualitycheck.py::test_country_code_formats[P:\cwa\dcc-quality-assurance\FR\1.3.0\VAC.png] - ValueError: Invalid country code: CNAM