From 3ed46eda38411ad9f471f030696a2b511481cb4b Mon Sep 17 00:00:00 2001 From: thcai Date: Fri, 11 Oct 2024 16:39:43 +0200 Subject: [PATCH] test coverage --- .../com/michelin/ns4kafka/controller/SchemaControllerTest.java | 2 +- .../java/com/michelin/ns4kafka/service/SchemaServiceTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java index f5a0b4a0..09d5784f 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java @@ -188,7 +188,7 @@ void shouldNotApplySchemaWhenValidationErrors() { } @Test - void shouldCreateSchemaInDryRunMode() { + void shouldNotCreateSchemaInDryRunMode() { Namespace namespace = buildNamespace(); Schema schema = buildSchema(); diff --git a/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java index 01c7f076..49ff8554 100644 --- a/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java @@ -159,7 +159,7 @@ void shouldListSchemaWithWildcardNameParameter() { .grantedTo("myNamespace") .resourcePatternType(AccessControlEntry.ResourcePatternType.LITERAL) .resourceType(AccessControlEntry.ResourceType.TOPIC) - .resource("prefix2.schema2-value") + .resource("prefix2.schema2") .build()) .build(), AccessControlEntry.builder() @@ -598,6 +598,7 @@ private SchemaResponse buildSchemaResponse(String subject) { + "\"doc\":\"Last name of the person\"},{\"name\":\"dateOfBirth\",\"type\":[\"null\"," + "{\"type\":\"long\",\"logicalType\":\"timestamp-millis\"}],\"default\":null," + "\"doc\":\"Date of birth of the person\"}]}") + .schemaType("AVRO") .references(List.of(Schema.SchemaSpec.Reference.builder() .name("HeaderAvro") .subject("header-value")