diff --git a/karapace/in_memory_database.py b/karapace/in_memory_database.py index 01e0153c1..772ba0a93 100644 --- a/karapace/in_memory_database.py +++ b/karapace/in_memory_database.py @@ -150,6 +150,8 @@ def insert_schema_version( ) def insert_subject(self, *, subject: Subject) -> None: + if subject is None: + print("Subject is none, coverage test") self.subjects.setdefault(subject, SubjectData()) def get_subject_compatibility(self, *, subject: Subject) -> str | None: diff --git a/karapace/schema_registry_apis.py b/karapace/schema_registry_apis.py index 4ef7b884a..de2fea9db 100644 --- a/karapace/schema_registry_apis.py +++ b/karapace/schema_registry_apis.py @@ -1205,6 +1205,9 @@ async def subject_post( ) -> None: self._check_authorization(user, Operation.Write, f"Subject:{subject}") + if subject is None: + print("Subject is none, coverage test") + body = request.json self.log.debug("POST with subject: %r, request: %r", subject, body) self._validate_subject(content_type, subject)