Commit 3c8ce0e2 authored by Filipe Ferreira's avatar Filipe Ferreira
Browse files

Invalid token types and methods.

parent 23307850
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -236,10 +236,8 @@ Package sys_mx2_ue_apps_context {
      Expected behaviour
      Expected behaviour
         ensure that {
         ensure that {
            when {
            when {
               the IUT entity receives a HttpMsg containing
               the IUT entity receives a iPOST containing
                  Uri indicating value "mx2/v2/app_contexts",
                  Uri indicating value "mx2/v2/app_contexts",
                  // Invalid token should trigger an error response.
                  headers set to vHeadersInvalidToken,
                  body containing
                  body containing
                     AppContext containing
                     AppContext containing
                        appInfo containing
                        appInfo containing
@@ -396,10 +394,8 @@ Package sys_mx2_ue_apps_context {
      Expected behaviour
      Expected behaviour
         ensure that {
         ensure that {
            when {
            when {
               the IUT entity receives a vPUT containing
               the IUT entity receives a iPUT containing
                  Uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}",
                  Uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}",
                  // Invalid token should trigger an error response.
                  headers set to vHeadersInvalidToken,
                  body containing
                  body containing
                     AppContext containing
                     AppContext containing
                        callbackReference indicating value some_uri
                        callbackReference indicating value some_uri
+1 −3
Original line number Original line Diff line number Diff line
@@ -149,10 +149,8 @@ Package sys_mx2_ue_applications {
      Expected behaviour
      Expected behaviour
         ensure that {
         ensure that {
            when {
            when {
               the IUT entity receives a HttpMsg containing
               the IUT entity receives a iGET containing
                  Uri indicating value "mx2/v2/app_list",
                  Uri indicating value "mx2/v2/app_list",
                  // Invalid token should trigger an error response.
                  headers set to vHeadersInvalidToken,
                  query_parameters containing
                  query_parameters containing
                     appName indicating value APP_NAME
                     appName indicating value APP_NAME
                  ;
                  ;
+26 −24
Original line number Original line Diff line number Diff line
@@ -88,30 +88,6 @@ Package MEC_Common {
      STRING "application/json;charset=utf-8";
      STRING "application/json;charset=utf-8";
      string CONTENT_JSON containing s set to "application/json;charset=utf-8";
      string CONTENT_JSON containing s set to "application/json;charset=utf-8";
      
      
      string HTTP_200_OK containing s set to "200 OK";
      STRING "200 OK";
        
      STRING "201 CREATED";
      string HTTP_201_CREATED containing s set to "201 CREATED";

      STRING "204 NO CONTENT";
      string HTTP_204_NO_CONTENT containing s set to "204 NO CONTENT";

      STRING "400 BAD REQUEST";
      string HTTP_400_BAD_REQUEST containing s set to "400 BAD REQUEST";
      
      STRING "401 UNAUTHORIZED";
      string HTTP_401_UNAUTHORIZED containing s set to "401 UNAUTHORIZED";
      
      STRING "403 FORBIDDEN";
      string HTTP_403_FORBIDDEN containing s set to "403 FORBIDDEN";
      
      STRING "404 NOT FOUND";
      string HTTP_404_NOT_FOUND containing s set to "404 NOT FOUND";
      
      STRING "406 NOT ACCEPTABLE";
      string HTTP_406_NOT_ACCEPTABLE containing s set to "406 NOT ACCEPTABLE";      

      STRING VALID_TOKEN;
      STRING VALID_TOKEN;
      
      
      STRING NOT_VALID_TOKEN;
      STRING NOT_VALID_TOKEN;
@@ -164,6 +140,32 @@ Package MEC_Common {
      	headers set to vHeadersResponse
      	headers set to vHeadersResponse
      ;
      ;


      HttpHeaders iHeadersGet containing
         accept set to "application/json",
         authorization set to NOT_VALID_TOKEN
      ;
      
      HttpHeaders iHeaders containing
         accept set to CONTENT_JSON,
         content_type set to CONTENT_JSON,
         authorization set to NOT_VALID_TOKEN
      ;
      
      HttpMsg iGET containing
         headers set to iHeadersGet
      ;

      HttpMsg iPOST containing
         headers set to iHeaders
      ;
      
      HttpMsg iPUT containing
          headers set to iHeaders
      ;
      
      HttpMsg iDELETE containing
         headers set to iHeadersGet
      ;
   }
   }
   
   
   Configuration {
   Configuration {