From ebfb61ac378a630024f6459f68b0ab8969a4fd0f Mon Sep 17 00:00:00 2001 From: thcai Date: Wed, 28 Aug 2024 10:03:04 +0200 Subject: [PATCH] Fix Integration test --- .../ns4kafka/integration/SchemaIntegrationTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java index cc5d11ef..15cec076 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java @@ -913,6 +913,16 @@ void shouldDeleteSchema() { .create(HttpMethod.GET, "/api/namespaces/ns1/schemas/ns1-subject4-value") .bearerAuth(token), Schema.class); - assertEquals(HttpStatus.NOT_FOUND, getSchemaAfterAllVersionsDeletionResponse.getStatus()); + // Get all schemas + var getResponseEmpty = ns4KafkaClient + .toBlocking() + .exchange(HttpRequest + .create(HttpMethod.GET, "/api/namespaces/ns1/schemas") + .bearerAuth(token), Argument.listOf(SchemaList.class)); + + assertTrue(getResponseEmpty.getBody().isPresent()); + assertTrue(getResponseEmpty.getBody().get() + .stream() + .noneMatch(schemaList -> schemaList.getMetadata().getName().equals("ns1-subject4-value"))); } }