From 319195236b90a9c4c78095a0e1e90f80f8b5b867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dywicki?= Date: Wed, 22 Apr 2020 14:42:57 +0200 Subject: [PATCH] Fix failing test, cause oauth device flow is encoded using realm attributes. --- .../java/org/keycloak/testsuite/admin/realm/RealmTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java index 75eaf1ca22..1addc9f0fc 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java @@ -179,7 +179,9 @@ public class RealmTest extends AbstractAdminTest { try { RealmRepresentation rep2 = adminClient.realm("attributes").toRepresentation(); - assertTrue("Attributes was expected to be empty, but was: " + String.join(", ", rep2.getAttributes().keySet()), rep2.getAttributes().isEmpty()); + Map attributes = rep2.getAttributes(); + assertTrue("Attributes expected to be present oauth2DeviceCodeLifespan, oauth2DevicePollingInterval, found: " + String.join(", ", attributes.keySet()), + attributes.size() == 2 && attributes.containsKey("oauth2DeviceCodeLifespan") && attributes.containsKey("oauth2DevicePollingInterval")); } finally { adminClient.realm("attributes").remove(); }