From 54c913d4d6b214f5403fce525f93548b4c34a875 Mon Sep 17 00:00:00 2001 From: Bogdan Irimie-Barb Date: Wed, 21 Feb 2024 12:22:07 +0200 Subject: [PATCH] Bump java-directory to v0.31.0 --- pom.xml | 2 +- .../aserto/directory/v3/DirectoryClient.java | 1 - src/test/java/DirectoryClientTest.java | 20 +++++++++---------- src/test/java/utils/Topaz.java | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 0beb73f..2d618f6 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ com.aserto java-directory - 0.30.2 + 0.31.0 diff --git a/src/main/java/com/aserto/directory/v3/DirectoryClient.java b/src/main/java/com/aserto/directory/v3/DirectoryClient.java index 57d8a77..a777f4d 100644 --- a/src/main/java/com/aserto/directory/v3/DirectoryClient.java +++ b/src/main/java/com/aserto/directory/v3/DirectoryClient.java @@ -1,6 +1,5 @@ package com.aserto.directory.v3; -import com.aserto.directory.importer.v3.Opcode; import com.aserto.utils.MessageChunker; import com.aserto.directory.common.v3.ObjectIdentifier; import com.aserto.directory.common.v3.PaginationRequest; diff --git a/src/test/java/DirectoryClientTest.java b/src/test/java/DirectoryClientTest.java index a284633..30d7c94 100644 --- a/src/test/java/DirectoryClientTest.java +++ b/src/test/java/DirectoryClientTest.java @@ -1,5 +1,4 @@ import com.aserto.ChannelBuilder; -import com.aserto.directory.common.v3.ObjectDependency; import com.aserto.directory.exporter.v3.ExportResponse; import com.aserto.directory.exporter.v3.Option; import com.aserto.directory.importer.v3.Opcode; @@ -54,6 +53,7 @@ class DirectoryClientTest { " relations:\n" + " ### display_name: user#manager ###\n" + " manager: user\n" + + " friend: user\n" + "\n" + " ### display_name: Identity ###\n" + " identity:\n" + @@ -61,6 +61,8 @@ class DirectoryClientTest { " ### display_name: identity#identifier ###\n" + " identifier: user\n" + "\n" + + " test_type:\n" + + "\n" + " ### display_name: Group ###\n" + " group:\n" + " relations:\n" + @@ -290,19 +292,17 @@ void testCheckManager() throws UninitilizedClientException { void testGetGraph() { // Arrange GetGraphRequest getGraphRequest = GetGraphRequest.newBuilder() - .setAnchorType("user") - .setAnchorId("rick@the-citadel.com") .setObjectType("user") .setObjectId("rick@the-citadel.com") + .setRelation("manager") + .setSubjectType("user") + .setSubjectId("morty@the-citadel.com") .build(); - List objectDependencyList = Arrays.asList( - ObjectDependency.newBuilder() + List objectDependencyList = Arrays.asList( + ObjectIdentifier.newBuilder() .setObjectType("user") - .setObjectId("rick@the-citadel.com") - .setRelation("manager") - .setSubjectType("user") - .setSubjectId("morty@the-citadel.com") + .setObjectId("morty@the-citadel.com") .build() ); @@ -319,7 +319,7 @@ void testGetGraph() { void setObjectTest() throws UninitilizedClientException { // Arrange Object object = Directory.buildObject("test_type", "test_id"); - + // Act SetObjectResponse setObjectResponse = directoryClient.setObject("test_type", "test_id"); diff --git a/src/test/java/utils/Topaz.java b/src/test/java/utils/Topaz.java index 87db55c..3433f92 100644 --- a/src/test/java/utils/Topaz.java +++ b/src/test/java/utils/Topaz.java @@ -42,7 +42,7 @@ public void stop() throws IOException, InterruptedException { } private void start() throws IOException, InterruptedException { - ProcessBuilder pb = new ProcessBuilder("topaz","start"); + ProcessBuilder pb = new ProcessBuilder("topaz","start", "--container-version", "model-v2.3"); pb.inheritIO(); Process process = pb.start(); process.waitFor();