File tree Expand file tree Collapse file tree 4 files changed +93
-0
lines changed 
integration-tests/amazon-lambda/src/test/java/io/quarkus/it/amazon/lambda Expand file tree Collapse file tree 4 files changed +93
-0
lines changed Original file line number Diff line number Diff line change 1+ package  io .quarkus .it .amazon .lambda ;
2+ 
3+ import  static  io .restassured .RestAssured .given ;
4+ import  static  org .hamcrest .CoreMatchers .containsString ;
5+ 
6+ import  org .junit .jupiter .api .Disabled ;
7+ import  org .junit .jupiter .api .Test ;
8+ 
9+ import  io .quarkus .it .amazon .lambda .profiles .EphemeralPortProfile ;
10+ import  io .quarkus .test .junit .QuarkusTest ;
11+ import  io .quarkus .test .junit .TestProfile ;
12+ 
13+ @ Disabled ("Failing since 3.22, should be fixed by by https://github.com/quarkusio/quarkus/issues/48006" )
14+ @ TestProfile (EphemeralPortProfile .class )
15+ @ QuarkusTest 
16+ public  class  AmazonLambdaEphemeralPortTestCase  {
17+ 
18+     @ Test 
19+     public  void  testSimpleLambdaSuccess () {
20+         InputObject  in  = new  InputObject ();
21+         in .setGreeting ("Hello" );
22+         in .setName ("Stu" );
23+         given ()
24+                 .contentType ("application/json" )
25+                 .accept ("application/json" )
26+                 .body (in )
27+                 .when ()
28+                 .post ()
29+                 .then ()
30+                 .statusCode (200 )
31+                 .body (containsString ("Hello Stu" ));
32+     }
33+ }
Original file line number Diff line number Diff line change 1+ package  io .quarkus .it .amazon .lambda ;
2+ 
3+ import  static  io .restassured .RestAssured .given ;
4+ import  static  org .hamcrest .CoreMatchers .containsString ;
5+ 
6+ import  org .junit .jupiter .api .Disabled ;
7+ import  org .junit .jupiter .api .Test ;
8+ 
9+ import  io .quarkus .it .amazon .lambda .profiles .TrivialProfile ;
10+ import  io .quarkus .test .junit .QuarkusTest ;
11+ import  io .quarkus .test .junit .TestProfile ;
12+ 
13+ @ Disabled ("Failing, tracked by https://github.com/quarkusio/quarkus/issues/48006" )
14+ @ TestProfile (TrivialProfile .class )
15+ @ QuarkusTest 
16+ public  class  AmazonLambdaWithProfileSimpleTestCase  {
17+ 
18+     @ Test 
19+     public  void  testSimpleLambdaSuccess () throws  Exception  {
20+         InputObject  in  = new  InputObject ();
21+         in .setGreeting ("Hello" );
22+         in .setName ("Stu" );
23+         given ()
24+                 .contentType ("application/json" )
25+                 .accept ("application/json" )
26+                 .body (in )
27+                 .when ()
28+                 .post ()
29+                 .then ()
30+                 .statusCode (200 )
31+                 .body (containsString ("Hello Stu" ));
32+     }
33+ 
34+ }
Original file line number Diff line number Diff line change 1+ package  io .quarkus .it .amazon .lambda .profiles ;
2+ 
3+ import  java .util .Map ;
4+ 
5+ import  io .quarkus .test .junit .QuarkusTestProfile ;
6+ 
7+ public  class  EphemeralPortProfile  implements  QuarkusTestProfile  {
8+     @ Override 
9+     public  Map <String , String > getConfigOverrides () {
10+         return  Map .of ("quarkus.lambda.mock-event-server.test-port" , "0" );
11+     }
12+ }
Original file line number Diff line number Diff line change 1+ package  io .quarkus .it .amazon .lambda .profiles ;
2+ 
3+ import  java .util .Map ;
4+ 
5+ import  io .quarkus .test .junit .QuarkusTestProfile ;
6+ 
7+ public  class  TrivialProfile  implements  QuarkusTestProfile  {
8+ 
9+     @ Override 
10+     public  Map <String , String > getConfigOverrides () {
11+         return  Map .of ("quarkus.lambda.handler" , "test" );
12+     }
13+ 
14+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments