From fe3a1560c75c4f429dcb061eea9d1103adae8df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pere=20Urb=C3=B3n?= Date: Fri, 5 Aug 2022 11:29:33 +0200 Subject: [PATCH] Verify schemas deletion process successfully, complement the related test (#516) --- .../kafka/topology/integration/RBACPRoviderRbacIT.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/java/com/purbon/kafka/topology/integration/RBACPRoviderRbacIT.java b/src/test/java/com/purbon/kafka/topology/integration/RBACPRoviderRbacIT.java index 368cf371b..730e524ac 100644 --- a/src/test/java/com/purbon/kafka/topology/integration/RBACPRoviderRbacIT.java +++ b/src/test/java/com/purbon/kafka/topology/integration/RBACPRoviderRbacIT.java @@ -331,6 +331,15 @@ public void schemasRbacCreation() throws IOException { assertThat(names).contains(resource.getName()); assertThat(resource.getResourceType()).isEqualTo("Subject"); } + // remove the first and only schema and check if properly deleted. + topology.getProjects().get(0).setSchemas(Collections.emptyList()); + + accessControlManager.updatePlan(topology, plan); + plan.run(); + + resources = apiClient.lookupResourcesForSchemaRegistry(schema.getPrincipal(), RESOURCE_OWNER); + assertThat(resources).isEmpty(); + } @Test