refactor asserts in ExportImportTest to be more verbose
This commit is contained in:
parent
9a16805f17
commit
aec59a7e91
1 changed files with 4 additions and 4 deletions
|
@ -155,7 +155,7 @@ public class ExportImportTest extends AbstractKeycloakTest {
|
||||||
|
|
||||||
removeRealm("test");
|
removeRealm("test");
|
||||||
removeRealm("test-realm");
|
removeRealm("test-realm");
|
||||||
assertEquals(1, adminClient.realms().findAll().size());
|
Assert.assertNames(adminClient.realms().findAll(), "master");
|
||||||
|
|
||||||
assertNotAuthenticated("test", "test-user@localhost", "password");
|
assertNotAuthenticated("test", "test-user@localhost", "password");
|
||||||
assertNotAuthenticated("test", "user1", "password");
|
assertNotAuthenticated("test", "user1", "password");
|
||||||
|
@ -168,7 +168,7 @@ public class ExportImportTest extends AbstractKeycloakTest {
|
||||||
testingClient.testing().exportImport().runImport();
|
testingClient.testing().exportImport().runImport();
|
||||||
|
|
||||||
// Ensure data are imported back
|
// Ensure data are imported back
|
||||||
assertEquals(3, adminClient.realms().findAll().size());
|
Assert.assertNames(adminClient.realms().findAll(), "master", "test", "test-realm");
|
||||||
|
|
||||||
assertAuthenticated("test", "test-user@localhost", "password");
|
assertAuthenticated("test", "test-user@localhost", "password");
|
||||||
assertAuthenticated("test", "user1", "password");
|
assertAuthenticated("test", "user1", "password");
|
||||||
|
@ -191,7 +191,7 @@ public class ExportImportTest extends AbstractKeycloakTest {
|
||||||
// Delete some realm (and some data in admin realm)
|
// Delete some realm (and some data in admin realm)
|
||||||
adminClient.realm("test").remove();
|
adminClient.realm("test").remove();
|
||||||
|
|
||||||
assertEquals(2, adminClient.realms().findAll().size());
|
Assert.assertNames(adminClient.realms().findAll(), "test-realm", "master");
|
||||||
|
|
||||||
assertNotAuthenticated("test", "test-user@localhost", "password");
|
assertNotAuthenticated("test", "test-user@localhost", "password");
|
||||||
assertNotAuthenticated("test", "user1", "password");
|
assertNotAuthenticated("test", "user1", "password");
|
||||||
|
@ -204,7 +204,7 @@ public class ExportImportTest extends AbstractKeycloakTest {
|
||||||
testingClient.testing().exportImport().runImport();
|
testingClient.testing().exportImport().runImport();
|
||||||
|
|
||||||
// Ensure data are imported back, but just for "test" realm
|
// Ensure data are imported back, but just for "test" realm
|
||||||
assertEquals(3, adminClient.realms().findAll().size());
|
Assert.assertNames(adminClient.realms().findAll(), "master", "test", "test-realm");
|
||||||
|
|
||||||
assertAuthenticated("test", "test-user@localhost", "password");
|
assertAuthenticated("test", "test-user@localhost", "password");
|
||||||
assertAuthenticated("test", "user1", "password");
|
assertAuthenticated("test", "user1", "password");
|
||||||
|
|
Loading…
Reference in a new issue