From 3a23b741d6e7c223f80db9f18ae3da0eaeffd0aa Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Tue, 19 Sep 2023 11:18:27 +0200 Subject: [PATCH] HAL-1889: Fix IIOP tests --- .../test/configuration/iiop/IIOPTest.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/test-configuration-iiop/src/test/java/org/jboss/hal/testsuite/test/configuration/iiop/IIOPTest.java b/test-configuration-iiop/src/test/java/org/jboss/hal/testsuite/test/configuration/iiop/IIOPTest.java index 6286500a..0b56d6b8 100644 --- a/test-configuration-iiop/src/test/java/org/jboss/hal/testsuite/test/configuration/iiop/IIOPTest.java +++ b/test-configuration-iiop/src/test/java/org/jboss/hal/testsuite/test/configuration/iiop/IIOPTest.java @@ -68,11 +68,12 @@ class IIOPTest { @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(FULL); + private static Operations operations; @BeforeAll static void setupModel() throws Exception { OnlineManagementClient client = wildFly.managementClient(); - Operations operations = new Operations(client); + operations = new Operations(client); operations.undefineAttribute(SUBSYSTEM_ADDRESS, PERSISTENT_SERVER_ID); operations.undefineAttribute(SUBSYSTEM_ADDRESS, EXPORT_CORBALOC); operations.writeAttribute(SUBSYSTEM_ADDRESS, SECURITY, IDENTITY); @@ -168,21 +169,22 @@ void updateSasContext() throws Exception { @Test void updateSecurity() throws Exception { + boolean clientRequiresSSL = operations.readAttribute(SUBSYSTEM_ADDRESS, "client-requires-ssl").booleanValue(); + boolean serverRequiresSSL = operations.readAttribute(SUBSYSTEM_ADDRESS, "client-requires-ssl").booleanValue(); + boolean supportSSL = operations.readAttribute(SUBSYSTEM_ADDRESS, "support-ssl").booleanValue(); page.getTabs().select(Ids.build(IIOP_PREFIX, GROUP, SECURITY, Ids.TAB)); form = page.getSecurityForm(); - crud.update(SUBSYSTEM_ADDRESS, form, SECURITY_DOMAIN, "other"); - } - - @Test - void updateSecurityInvalidSSLSettings() { - page.getTabs().select(Ids.build(IIOP_PREFIX, GROUP, SECURITY, Ids.TAB)); - form = page.getSecurityForm(); - crud.updateWithError(form, - f -> { - f.text(CLIENT_SSL_CONTEXT, "foo"); - f.text(SECURITY_DOMAIN, "bar"); + crud.update(SUBSYSTEM_ADDRESS, form, + formFragment -> { + formFragment.flip("client-requires-ssl", !clientRequiresSSL); + formFragment.flip("server-requires-ssl", !serverRequiresSSL); + formFragment.flip("support-ssl", !supportSSL); }, - CLIENT_SSL_CONTEXT, SECURITY_DOMAIN); + resourceVerifier -> { + resourceVerifier.verifyAttribute("client-requires-ssl", !clientRequiresSSL); + resourceVerifier.verifyAttribute("server-requires-ssl", !serverRequiresSSL); + resourceVerifier.verifyAttribute("support-ssl", !supportSSL); + }); } @Test