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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations