Search in sources :

Example 51 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class MinimumPermissionsTestCase method deployment.

/**
     * Test deployment with {@link PrintSystemPropertyServlet} and without any permissions deployment descriptor.
     *
     * @return
     */
@Deployment(name = DEPLOYMENT, testable = false)
public static WebArchive deployment() {
    LOGGER.debug("Start WAR deployment");
    final WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT + ".war");
    war.addClasses(PrintSystemPropertyServlet.class);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 52 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class WebSecurityCERTTestCase method deployment.

@Deployment
public static WebArchive deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "web-secure-client-cert.war");
    war.addClass(SecuredServlet.class);
    war.addAsWebInfResource(WebSecurityCERTTestCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
    war.addAsWebInfResource(WebSecurityCERTTestCase.class.getPackage(), "web.xml", "web.xml");
    war.addAsResource(WebSecurityCERTTestCase.class.getPackage(), "users.properties", "users.properties");
    war.addAsResource(WebSecurityCERTTestCase.class.getPackage(), "roles.properties", "roles.properties");
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 53 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class WebSecurityDIGESTTestCase method deployment.

@Deployment(name = DEPLOYMENT)
public static WebArchive deployment() throws Exception {
    final WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT + ".war");
    war.addClasses(SimpleServlet.class, SimpleSecuredServlet.class);
    war.addAsResource(new StringAsset(USERS), "users.properties");
    war.addAsResource(new StringAsset(ROLES), "roles.properties");
    war.addAsWebInfResource(Utils.getJBossWebXmlAsset(SECURITY_DOMAIN_NAME), "jboss-web.xml");
    war.addAsWebInfResource(WebSecurityDIGESTTestCase.class.getPackage(), "web.xml", "web.xml");
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 54 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class ServletLifecycleMethodDescriptorTestCase method single.

@Deployment
public static WebArchive single() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "single.war");
    war.addClasses(HttpRequest.class, LifeCycleMethodServlet.class);
    war.addAsWebInfResource(ServletLifecycleMethodDescriptorTestCase.class.getPackage(), "web.xml", "web.xml");
    war.addAsManifestResource(createPermissionsXmlAsset(new JndiPermission("java:global/env/foo", "bind")), "permissions.xml");
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JndiPermission(org.wildfly.naming.java.permission.JndiPermission) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 55 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class ServletResourceOverlaysTestCase method single.

@Deployment
public static WebArchive single() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "single.war");
    war.addAsWebResource(new StringAsset("a"), "a.txt");
    war.addAsWebResource(new StringAsset("b"), "b.txt");
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar");
    jar.addAsManifestResource(new StringAsset("b - overlay"), new BasicPath("resources", "b.txt"));
    jar.addAsManifestResource(new StringAsset("c - overlay"), new BasicPath("resources", "c.txt"));
    war.addAsLibrary(jar);
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) BasicPath(org.jboss.shrinkwrap.impl.base.path.BasicPath) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

Deployment (org.jboss.arquillian.container.test.api.Deployment)869 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)530 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)423 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)299 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)146 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)139 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)48 Asset (org.jboss.shrinkwrap.api.asset.Asset)45 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)27 PropertyPermission (java.util.PropertyPermission)26 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)23 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)23 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)22 File (java.io.File)17 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)16 SocketPermission (java.net.SocketPermission)13 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 Util (org.jboss.as.test.shared.integration.ejb.security.Util)11 Properties (java.util.Properties)10