Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add WildFly 25 #210

Merged
merged 4 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.Property;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.ModelNodeResult;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
Expand Down Expand Up @@ -44,6 +47,15 @@ public class AddAuthorizationModuleOnlineTest {
private static final Address TEST_AUTHORIZATION_MODULE_ADDRESS_2 = TEST_AUTHZ_CLASSIC_ADDRESS
.and("policy-module", TEST_AUTHORIZATION_MODULE_NAME_2);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a proposal - wouldn't be better to create some common function for this and use it in all relevant places instead of having the very same code on multiple places? 👼

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about it but in the end, I followed the same convention as it is in elytron commands, there is a similar check in every elytron command.


@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.Property;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
Expand Down Expand Up @@ -44,6 +47,15 @@ public class AddLoginModuleOnlineTest {
private static final Address TEST_LOGIN_MODULE_ADDRESS_2 = TEST_AUTHN_CLASSIC_ADDRESS
.and("login-module", TEST_LOGIN_MODULE_NAME_2);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.Property;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.ModelNodeResult;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
Expand Down Expand Up @@ -44,6 +47,15 @@ public class AddMappingModuleOnlineTest {
private static final Address TEST_MAPPING_MODULE_ADDRESS_2 = TEST_MAPPING_CLASSIC_ADDRESS
.and("mapping-module", TEST_MAPPING_MODULE_NAME_2);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
Expand All @@ -33,6 +36,15 @@ public class AddSecurityDomainOnlineTest {
private static final Address TEST_SECURITY_DOMAIN_ADDRESS
= Address.subsystem("security").and("security-domain", TEST_SECURITY_DOMAIN_NAME);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws IOException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.OperationException;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
import org.junit.Ignore;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -60,6 +63,15 @@ public class RemoveAuthorizationModuleOnlineTest {
.addModuleOption("delegateMap", "delegateMapValue")
.build();

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws IOException, CommandFailedException, OperationException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.OperationException;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
import org.junit.Ignore;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -59,6 +62,15 @@ public class RemoveLoginModuleOnlineTest {
.addModuleOption("realm", "ApplicationRealm")
.build();

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws IOException, CommandFailedException, OperationException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.OperationException;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
import org.junit.Ignore;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -59,6 +62,15 @@ public class RemoveMappingModuleOnlineTest {
.addModuleOption("realm", "ApplicationRealm")
.build();

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws IOException, CommandFailedException, OperationException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
Expand All @@ -32,6 +35,15 @@ public class RemoveSecurityDomainOnlineTest {
private static final Address TEST_SECURITY_DOMAIN_ADDRESS
= Address.subsystem("security").and("security-domain", TEST_SECURITY_DOMAIN_NAME);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws IOException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
Expand Down Expand Up @@ -37,6 +39,15 @@ public class AddJaasAuthenticationOnlineTest {
private static final Address TEST_SECURITY_REALM_JAAS_AUTHN_ADDRESS
= TEST_SECURITY_REALM_ADDRESS.and("authentication", "jaas");

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public static void checkServerVersionIsSupported() throws IOException {
Assume.assumeTrue("Kerberos authentication in security realm is available since WildFly 9 or in EAP 6.4.x.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_1_7_0)
&& !serverVersion.inRange(ServerVersion.VERSION_2_0_0, ServerVersion.VERSION_2_2_0));
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
Expand Down Expand Up @@ -40,6 +42,15 @@ public class AddLdapAuthenticationOnlineTest {
private static final Address TEST_LDAP_CONNECTION_ADDRESS
= Address.coreService("management").and("ldap-connection", TEST_LDAP_CONNECTION);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import java.util.concurrent.TimeoutException;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.ManagementClient;
Expand All @@ -17,7 +19,6 @@
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.junit.Assume;
import org.wildfly.extras.creaper.core.ServerVersion;

import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -51,6 +52,15 @@ public class AddLdapAuthorizationOnlineTest {
private static final Address TEST_LDAP_CONNECTION_ADDRESS
= Address.coreService("management").and("ldap-connection", TEST_LDAP_CONNECTION);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.dmr.ModelNode;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.extras.creaper.core.CommandFailedException;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.CliException;
import org.wildfly.extras.creaper.core.online.ModelNodeResult;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
Expand All @@ -37,6 +40,15 @@ public class AddLdapConnectionOnlineTest {
private static final Address TEST_LDAP_CONNECTION_ADDRESS
= Address.coreService("management").and("ldap-connection", TEST_LDAP_CONNECTION);

@BeforeClass
public static void checkServerVersionIsSupported() throws Exception {
// check version is supported
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeFalse("Legacy security was removed in WildFly 25.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_18_0_0));
}

@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Expand Down
Loading