350: Transfer Order file via FTP and error handling

Test Case #:350


Test Case Name: Transfer Order file via FTP and error handling

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:21.12.2016

Short description

  • If no supply line is associated with the supervisory node, status = Transfer Failed
  • if the supplying depot selected doesn't have the FTP configured the following Transfer Failed_FTP Details Missing
  • if the supplying depot selected is configured, the file transfers via FTP
  • If FTP transfer fails, status changes to failed transfer
  • Send an email notification to the user that converted the order

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       



Step

Action

Expected system response

Comment

1

               Create FTP configuration for facility.     

URL:  http://10.222.17.134/api/transferProperties/ce88d3b1-0518-42fb-8fc1-e47ad80c7134?access_token=9adf564b-a363-478d-be7c-bd37aeb5cbfc

Method: POST

Body:

{

  "type": "ftp",

  "id": "ce88d3b1-0518-42fb-8fc1-e47ad80c7134",

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

  "protocol": "FTP",

  "username": "admin",

  "password": null,

  "serverHost": "ftp",

  "serverPort": 21,

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

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

  "passiveMode": true

}

                                                                             

       The configuration for seding files via FTP is created successfully.

                                                 

2

 Convert the requisition to order.


The requisition has been successfully converted to order.


3

Check the email (the email with order details and proper status should be send).


The email with order details (number, status) is received. When requisition is converted to order and supplying depot select have the FTP configured, the status will be set to IN_ROUTE.

4

 Create LOCAL configuration for facility.

URL:  http://10.222.17.134/api/transferProperties/ce88d3b1-0518-42fb-8fc1-e47ad80c7134?access_token=9adf564b-a363-478d-be7c-bd37aeb5cbfc

Method: PUT

Body:

{

  "type": "local",

  "id": "ce88d3b1-0518-42fb-8fc1-e47ad80c7134",

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

  "path": "/var/lib/openlmis/fulfillment/orders/W01"

}

The configuration for saving files locally is created successfully


5

Convert the second requisition to order.


The requisition has been successfully converted to order.

6

 Check the email (the email with order details and proper status should be send).


The email with order details (number, status) is received. When requisition is converted to order and supplying depot select have the FTP configured, the status will be set to READY_TO_PACK.



7

 Delete the transferProperties configuration.


The configuration has been successfully deleted.


8Convert the third requisition to order.


The requisition has been successfully converted to order.


9Check the email (the email with order details and proper status should be send).


The email with order details (number, status) is received. When requisition is converted to order and supplying depot select have the FTP configured, the status will be set to TRANSFER_FAILED.

10

                 Create again transferProperties for sendig files via FTP/local folder.  


URL:  http://10.222.17.134/api/transferProperties?access_token=9adf564b-a363-478d-be7c-bd37aeb5cbfc

 Method: POST

Body:

{

  "type": "local",

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

  "path": "/var/lib/openlmis/fulfillment/orders/W01"

}


The configuration is created successfully.


11

Delete the supplyLine associated with supervisoryNode

URL:

http://10.222.17.134/api/supplyLines/54e16aae-35f1-489a-9819-0a677de50d19?access_token=2a5033d9-d830-4285-846b-e252ff9cb040

Method: PUT


The supplyLine has been successfully deleted.


12Try to convert the requisition to order.The requisitions will not appear because supplyLine (which should be associated with supervisoryNode) is deleted.



Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software