Skip to content

Commit

Permalink
Merge pull request #119 from hpehl/HAL-1889
Browse files Browse the repository at this point in the history
HAL-1889: Fix IIOP tests
  • Loading branch information
hpehl authored Sep 19, 2023
2 parents fd572da + 3a23b74 commit 5561518
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5561518

Please sign in to comment.