Search in sources :

Example 31 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class SAMLMetadataTestCase method deploymentSP1.

@Deployment(name = "service-provider-1")
public static WebArchive deploymentSP1() {
    WebArchive serviceProvider = serviceProviderWithKeyStore("sp-metadata1.war");
    serviceProvider.addAsResource(SAMLMetadataTestCase.class.getPackage(), "sp-metadata1.xml", "sp-metadata.xml");
    return serviceProvider;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 32 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class SAMLMetadataTestCase method deploymentIdP.

@Deployment(name = "identity-provider")
public static WebArchive deploymentIdP() {
    WebArchive identityProvider = identityProviderWithKeyStore("idp-metadata.war");
    identityProvider.addAsResource(SAMLMetadataTestCase.class.getPackage(), "idp-metadata.xml", "idp-metadata.xml");
    return identityProvider;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 33 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class MaximumPermissionsTestCase method createDeployment.

/**
     * Creates deployment with {@link PrintSystemPropertyServlet} and index.html simple page. If permissionsFilename parameter
     * is not-<code>null</code>, then permission declaration file with given name is also generated to the deployment.
     *
     * @param permissionsFilename filename under META-INF where to store requested permissions (usually permissions.xml,
     *        jboss-permissions.xml or null to skip requesting permissions)
     * @param deploymentName
     * @return
     */
private static WebArchive createDeployment(String permissionsFilename, String deploymentName) {
    LOGGER.debug("Start WAR deployment");
    final WebArchive war = ShrinkWrap.create(WebArchive.class, deploymentName + ".war");
    war.addClasses(PrintSystemPropertyServlet.class);
    war.addAsWebResource(new StringAsset(INDEX_HTML), "index.html");
    if (permissionsFilename != null) {
        war.addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new PropertyPermission("*", "read")), permissionsFilename);
    }
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive)

Example 34 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive 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 35 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive 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)

Aggregations

WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)519 Deployment (org.jboss.arquillian.container.test.api.Deployment)421 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)170 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)110 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)89 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)80 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 File (java.io.File)25 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)25 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 PropertyPermission (java.util.PropertyPermission)11 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)11 SocketPermission (java.net.SocketPermission)10 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)10 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)9 BeforeClass (org.junit.BeforeClass)9 Test (org.junit.Test)9 ClassLoaderAsset (org.jboss.shrinkwrap.api.asset.ClassLoaderAsset)8 Runner (org.apache.openejb.arquillian.tests.Runner)7 Util (org.jboss.as.test.shared.integration.ejb.security.Util)7