Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Test Case #:1518


Test Case Name:   Manually retry for transferring order file via FTP

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:

13

18.01.2017

Short description

  • create a new endpoint for manually retry
  • the endpoint should take an order id as parameter
  • the endpoint should return 404 error if order does not exist
  • the endpoint should return 400 error if order has incorrect status
  • if there will be any problem the endpoint should return error message with correct HTTP status code
  • the endpoint should return 200 if everything is O.K.
  • don't forget to add IT tests for all HTTP status codes.
  • don't allow transfer for orders that have succeded in transfer

                                                                                                                                                   


Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

Convert the requisition to order when transferProperties is added with proper facilityId.

 The requisition should be successfully converted to order.
Image Modified

 

2

 

The requisition has been successfully converted to order, csv file has been sent via FTP, so there is no need for rettrying seding the file via FTP. The order has status IN_ROUTE so retrying is not possible.

Image Modified


When status is set to IN_ROUTE it means that file has been sent via FTP.

Image Modified

3

 Try

 Try to retry manually the transferring order file via FTP when order does not exist.

URL:  http://10.222.17.134/api/orders/58960f6d-61e8-4481-bfb2-c278155059e4/retry?access_token=43c3c781-8e4c-458a-bf1f-53f237c3fecf

Method: GET

Image Removed

 

The transferring the order file via FTP can't be retried because the ORDER with entered ID is not created.

Image Added

Check if it's true that the order with provided ID does not exist.

URL:  http://10.222.17.134/api/orders/58960f6d-61e8-4481-bfb2-c278155059e4?access_token=43c3c781-8e4c-458a-bf1f-53f237c3fecf

Method: GET

Image Modified

4

Try to retry manually the transferring order file via FTP when transferProperties for proper facility has been deleted.

Method: GET

URL:  http://10.222.17.134/api/orders/

2374eb4a
b223
4821
9820
bff0c0102bc9
0c0c835b
5c98
4ba7
a083-6999027cad3c

Method: GET

Image Removed 

 Check using API the status of ORDER

 The file can't be send because the transferPropertied do not exist for proper facility. The status should be still TRANSFER_FAILED.

Image Added

 


5

Add the transferProperties to proper facility.

URL:

   

http://10.222.17.134/api/

orders/search?supplyingFacility=19121381-9f3d-4e77-b9e5-d3f59fc1639e&

transferProperties?access_token=43c3c781-8e4c-458a-bf1f-53f237c3fecf

Method

MEthod:

GET

POST

Image Removed

Add the transferProperties to proper facility and try again manually retry transferring order file via FTP.

Body:

 

Body:

5

 {

    "facility":   {

    "

facilityId

id": "19121381-9f3d-4e77-b9e5-d3f59fc1639e",

    "code": "W01",

    "name": "CMST Warehouse",

    "geographicZone": {

      "code": "Mal-So",

      "name": "Southern Region",

      "level": {

        "code": "Region",

        "levelNumber": 2,

        "id": "9b497d87-cdd9-400e-bb04-fae0bf6a9491"

      },

      "id": "0bbd69c1-e20f-48f5-aae4-26dcd8aa7602"

    },

    "type": {

      "code": "warehouse",

      "name": "Warehouse",

      "displayOrder": 3,

      "active": true,

      "id": "e2faaa9e-4b2d-4212-bb60-fd62970b2113"

    },

    "operator": {

      "code": "moh",

      "name": "Ministry of Health",

      "displayOrder": 1,

      "id": "9456c3e9-c4a6-4a28-9e08-47ceb16a4121"

    },

    "active": true,

    "enabled": true,

    "openLmisAccessible": true,

    "supportedPrograms": [

      {

        "id": "66032ea8-b69b-4102-a1eb-844e57143187",

        "code": "PRG003",

        "name": "New program",

        "programActive": true,

        "periodsSkippable": false,

        "showNonFullSupplyTab": false,

        "supportActive": true

      }

    ]


  },

    "type": "ftp",

    "protocol": "FTP",

    "username": "admin",

    "password": "p@ssw0rd",

    "serverHost": "ftp",

    "serverPort": 21,

    "remoteDirectory": "/orders/files/csv/W01",

    "localDirectory": "/var/lib/openlmis/fulfillment/orders/W01",

    "passiveMode": true

  }




The transferProperties has been created successfully.


Image Added





8

   Try again manually retry transferring order file via FTP.              

URL:  http://10.222.17.134/api

/transferProperties

/orders/aa70bb2f-c95b-4efd-9d07-9cd4c7320726/retry?access_token=

43c3c781

5cf57308-

8e4c

8082-

458a

4a9e-

bf1f

abb0-

53f237c3fecf

562c79609ca7

MEthod

Method:

POST

GET

Image Removed

 

Image Removed

Image Removed 

8

                                                  

Image Added

Image Added

 

 

Post – conditions: