2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <web-app xmlns =" http://xmlns.jcp.org/xml/ns/javaee" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi : schemaLocation =" http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
4
+ version =" 3.1" >
5
+
6
+ <login-config >
7
+ <auth-method >BASIC</auth-method >
8
+ <realm-name >file</realm-name >
9
+ </login-config >
10
+
11
+ </web-app >
Original file line number Diff line number Diff line change 7
7
import static org .junit .Assert .assertNotNull ;
8
8
import static org .junit .Assert .fail ;
9
9
10
+ import java .io .File ;
10
11
import java .net .URL ;
11
12
12
13
import org .jboss .arquillian .container .test .api .Deployment ;
29
30
*/
30
31
@ RunWith (Arquillian .class )
31
32
public class SecureServletTest {
33
+
34
+ private static final String WEBAPP_SRC = "src/main/webapp" ;
32
35
33
36
@ ArquillianResource
34
37
private URL base ;
@@ -43,7 +46,8 @@ public static WebArchive createDeployment() {
43
46
addUsersToContainerIdentityStore ();
44
47
45
48
return create (WebArchive .class )
46
- .addClass (SecureServlet .class );
49
+ .addClass (SecureServlet .class )
50
+ .addAsWebInfResource ((new File (WEBAPP_SRC + "/WEB-INF" , "web.xml" )));
47
51
}
48
52
49
53
@ Before
0 commit comments