forked from wildfly/wildfly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WFLY-8562] Move EjbElytronDomainSetup to wildfly-testsuite-shared an…
…d update it so it can also be used by tests in the basic integration testsuite
- Loading branch information
Showing
2 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
import static org.junit.Assert.fail; | ||
|
||
import java.io.ByteArrayOutputStream; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.net.HttpURLConnection; | ||
|
@@ -69,6 +70,7 @@ | |
import org.junit.Test; | ||
import org.junit.experimental.categories.Category; | ||
import org.junit.runner.RunWith; | ||
import org.wildfly.test.security.common.elytron.EjbElytronDomainSetup; | ||
|
||
/** | ||
* Test case to hold the authentication scenarios, these range from calling a servlet which calls a bean to calling a bean which | ||
|
@@ -78,7 +80,7 @@ | |
* @author <a href="mailto:[email protected]">Darran Lofthouse</a> | ||
*/ | ||
@RunWith(Arquillian.class) | ||
@ServerSetup({EjbElytronDomainSetup.class}) | ||
@ServerSetup({AuthenticationTestCase.EjbSecurityDomainSetup.class}) | ||
@Category(CommonCriteria.class) | ||
public class AuthenticationTestCase { | ||
|
||
|
@@ -509,4 +511,12 @@ public void testICIR_TwoBeans_ReAuth_ViaServlet() throws Exception { | |
// 17.6.7 - Principal Mapping | ||
// 17.6.9 - Runtime Security Enforcement | ||
// 17.6.10 - Audit Trail | ||
|
||
static class EjbSecurityDomainSetup extends EjbElytronDomainSetup { | ||
public EjbSecurityDomainSetup() { | ||
super(new File(AuthenticationTestCase.class.getResource("users.properties").getFile()).getAbsolutePath(), | ||
new File(AuthenticationTestCase.class.getResource("roles.properties").getFile()).getAbsolutePath()); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters