829: Configurable FTP or local file folder properties

Test Case #:829


Test Case Name: Configurable FTP or local file folder properties

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:19.05.2016

Short description

bility to set up FTP details for a facility/supplying depot:

  • FTP server host,
  • FTP server port ,
  • FTP server authentication username,
  • FTP server authentication password,
  • FTP local folder path
  • the FTP details are tied to a facility by facility code

Acceptance Criteria for Local folder

  • ability to set up local details for a facility/supplying depot:
    • path to local directory,
  • the local details are tied to a facility by facility code

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       




Step

Action

Expected system response

Comment

1

     Create FTP details for facility.

  URL:  http://10.222.17.134/api/transferProperties?access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: POST

 {

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

    "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

}

                                                                                                                            

                                                 

2

Set up LOCAL details for facility.

URL:  http://10.222.17.134/api/transferProperties?access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: POST

{

    "type": "local",

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

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

}


3

Get the details of chosen transferProperties.

URL:   http://10.222.17.134/api/transferProperties/ce88d3b1-0518-42fb-8fc1-e47ad80c7134?access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: GET


4

 Delete the transferProperties.

URL:  http://10.222.17.134/api/transferProperties/ce88d3b1-0518-42fb-8fc1-e47ad80c7134?access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: DELETE


5

 Update the transferProperties: do not change the type.

URL:   http://10.222.17.134/api/transferProperties/75c32924-aaf6-48a7-87f4-f76897fdbf7f?access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: PUT

Body:

{

  "type": "local",

  "id": "75c32924-aaf6-48a7-87f4-f76897fdbf7f",

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

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

}




6

 Update the transferProperties: change the type.

URL:  http://10.222.17.134/api/transferProperties/badc2460-df20-4542-ae1e-3b861105733d?access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: PUT

Body:

 {

      "id": "badc2460-df20-4542-ae1e-3b861105733d",

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

    "type": "local",

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

}


7

Get the transferProperties for facility:

URL:  http://10.222.17.134/api/transferProperties/search?facility=19121381-9f3d-4e77-b9e5-d3f59fc1639e&access_token=44b54d9f-9b77-47b2-9182-a0e41356d733

Method: GET


8

When transferProperties is created for FTP, convert the requisition to order.


9Log in into FTP client (e.g. FileZilla) and check if CSV file is generated.


10

             When transferProperties is creared for LOCAL, convert the requisition to order.


11After creating the order, check move into local directory (defined in "path" variable at transferProperties)





Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software