KEYCLOAK-12964 Fix adapter remote tests execution deciding
This commit is contained in:
parent
1bb238d20f
commit
c3f0b342bf
2 changed files with 8 additions and 0 deletions
|
@ -316,6 +316,10 @@ public class AppServerTestEnricher {
|
||||||
return CURRENT_APP_SERVER.contains("fuse");
|
return CURRENT_APP_SERVER.contains("fuse");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isRemoteAppServer() {
|
||||||
|
return CURRENT_APP_SERVER.contains("remote");
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isJBossBased() {
|
private boolean isJBossBased() {
|
||||||
return testContext.getAppServerInfo().isJBossBased();
|
return testContext.getAppServerInfo().isJBossBased();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.jboss.arquillian.test.spi.execution.ExecutionDecision;
|
||||||
import org.jboss.arquillian.test.spi.execution.TestExecutionDecider;
|
import org.jboss.arquillian.test.spi.execution.TestExecutionDecider;
|
||||||
import org.jboss.arquillian.core.api.Instance;
|
import org.jboss.arquillian.core.api.Instance;
|
||||||
import org.jboss.arquillian.core.api.annotation.Inject;
|
import org.jboss.arquillian.core.api.annotation.Inject;
|
||||||
|
import org.keycloak.testsuite.arquillian.AppServerTestEnricher;
|
||||||
import org.keycloak.testsuite.arquillian.AuthServerTestEnricher;
|
import org.keycloak.testsuite.arquillian.AuthServerTestEnricher;
|
||||||
import org.keycloak.testsuite.arquillian.TestContext;
|
import org.keycloak.testsuite.arquillian.TestContext;
|
||||||
import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude;
|
import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude;
|
||||||
|
@ -39,6 +40,9 @@ public class AuthServerExcludeExecutionDecider implements TestExecutionDecider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExecutionDecision decide(Method method) {
|
public ExecutionDecision decide(Method method) {
|
||||||
|
if (AppServerTestEnricher.isRemoteAppServer()) {
|
||||||
|
return ExecutionDecision.execute();
|
||||||
|
}
|
||||||
TestContext testContext = testContextInstance.get();
|
TestContext testContext = testContextInstance.get();
|
||||||
|
|
||||||
if (method.isAnnotationPresent(AuthServerContainerExclude.class)) {
|
if (method.isAnnotationPresent(AuthServerContainerExclude.class)) {
|
||||||
|
|
Loading…
Reference in a new issue