diff --git a/compliance_status.db b/compliance_status.db new file mode 100644 index 0000000..2b4e47a Binary files /dev/null and b/compliance_status.db differ diff --git a/docs/detailed-guide.md b/docs/detailed-guide.md index 4b932fd..74fac1f 100644 --- a/docs/detailed-guide.md +++ b/docs/detailed-guide.md @@ -529,9 +529,9 @@ poetry run pytest tests/ -v - `tests/test_cli.py`: 3 CLI parsing tests - `tests/test_iana_validator.py`: 20 IANA validation tests - `tests/test_iana_parse.py`: 14 IANA parsing tests -- `tests/test_iana_update.py`: 13 IANA update tests +- `tests/test_iana_update.py`: 14 IANA update tests -**Total:** 63 tests +**Total:** 64 tests **Test database setup:** diff --git a/src/sslysze_scan/data/iana_parse.json b/src/sslysze_scan/data/iana_parse.json index f98d7ca..479cf55 100644 --- a/src/sslysze_scan/data/iana_parse.json +++ b/src/sslysze_scan/data/iana_parse.json @@ -24,11 +24,6 @@ "tls-parameters-5", "tls_content_types.csv", ["Value", "Description", "DTLS", "Recommended", "RFC/Draft"] - ], - [ - "tls-parameters-7", - "tls_content_types.csv", - ["Value", "Description", "DTLS", "Recommended", "RFC/Draft"] ] ], "https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xml": [ diff --git a/tests/test_iana_update.py b/tests/test_iana_update.py index f53c0f4..02a21e2 100644 --- a/tests/test_iana_update.py +++ b/tests/test_iana_update.py @@ -283,3 +283,42 @@ class TestDiffCalculationEdgeCases: assert "0x03" in diff["added"] assert "0x02" in diff["deleted"] assert "0x01" in diff["modified"] + + +class TestConsecutiveUpdates: + """Tests for consecutive IANA updates.""" + + def test_consecutive_updates_show_no_changes(self, test_db_path: str) -> None: + """Test that second update with same data shows no changes.""" + xml_path = "tests/fixtures/iana_xml/tls-parameters-minimal.xml" + + with open(xml_path, encoding="utf-8") as f: + xml_content = f.read() + + conn = sqlite3.connect(test_db_path) + headers = ["Value", "Description", "DTLS", "Recommended", "RFC/Draft"] + + row_count_1, diff_1 = process_registry_with_validation( + xml_content, + "tls-parameters-4", + "iana_tls_cipher_suites", + headers, + conn, + skip_min_rows_check=True, + ) + + row_count_2, diff_2 = process_registry_with_validation( + xml_content, + "tls-parameters-4", + "iana_tls_cipher_suites", + headers, + conn, + skip_min_rows_check=True, + ) + + assert row_count_1 == row_count_2 + assert len(diff_2["added"]) == 0 + assert len(diff_2["deleted"]) == 0 + assert len(diff_2["modified"]) == 0 + + conn.close()