Versions Compared

Key

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

...

  • Receives ILS calls from integration test code

  • Replies with valid responses

  • Maintains internal database of test data, initialized by the test suite

Mock services & test servers needed

...

Mock servers are located on the client network. For mock servers to work, Gateway and CIRC server should be working. Mock servers are running in the Docker containers.

Dataflow

...

Princeton University (PUL) and Columbia University (CL) have SIP2 servers.

...

Hence below Mock servers are built:

  • PUL/CUL SIP2 Mock Server

  • CL SIP 2 Mock Server

  • NYPL REST Mock Server

  • LAS Mock Server

When Request is placed to SIP2 server it will convert the request to string and while passing the response it will convert string to the response

  • NYPL REST Mock Server

For getting the request and sending the response it uses RESTful Services.

  • LAS Mock Server

It uses ActiveMQ. When a request is placed in the gateway, gateway passes it to the CIRC server and the CIRC server will call the LAS server, from LAS, the response is sent to CIRC and in turn, CIRC passes it to the gateway.

Property Files

Info

Mock Server Connections

ils.nypl.sip.server.url=172.17.0.4

ils.nypl.sip.server.port=8012

ils.princeton.port=8012

ils.columbia.port=8012

ils.princeton=172.17.0.4

ils.columbia=172.17.0.4

ils.nypl.data.api = http://172.17.0.5:8090/rest

gfa.item.status = http://172.17.0.7:8080/lasapi/rest/lasapiSvc/itemStatus

Info

PUL Credentials informations

ils.princeton.operator.user.id= recap

ils.princeton.operator.password= recap

ils.princeton.operator.location= location

Info

CUL Credentials informations

ils.columbia.operator.user.id= recap

ils.columbia.operator.password= recap

ils.columbia.operator.location= CIRCrecap

Info

NYPL Credentials informations

ils.nypl.operator.user.id= htc_scsb

ils.nypl.operator.password= m0Fg7xbm3ZPq5djD3gBHTu3mQYrBpf6U

ils.nypl.oauth.token.api= https://isso.nypl.org/oauth/token

ils.nypl.bibdata= https://qa-platform.nypl.org/api

ils.nypl.bibdata.parameter= /v0.1/-recap/nypl-bibs?barcode={barcode}&customercode={customercode}

Docker Commands

SIP2 Mock Server

sudo docker run --name phase4-sip2-mock-server --restart always -v /data:/recap-vol  -p 8012:8012 -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/recap-vol/phase4-scsb-mock-nypl-server/heapdump/  -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*" -Dspring.config.location=/recap-vol/config/external-application.properties" -d phase4-sip2-mock-server

 NYPL Mock Server

 sudo docker build -t phase4-scsb-mock-nypl-server .

sudo docker run --name phase4-scsb-mock-nypl-server -p 8090:8090 -e "DB_HOST=172.17.0.2" -e "DB_USERNAME=recap" -e "DB_PASSWORD=recap" -e "DB_PORT=3306" -d phase4-scsb-mock-nypl-server

sudo docker inspect phase4-scsb-mock-nypl-server | grep IPAddress

LAS Mock Server

sudo docker build -t phase4-scsb-mock-las-server  .
docker images | grep none | awk '{ print $3; }' | xargs docker rmi
sudo docker run --name phase4-scsb-mock-las-server --restart always -v /data:/recap-vol  -p 9103:9103 -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/recap-vol/phase4-scsb-mock-las-server/heapdump/  -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*" -Dspring.config.location=/recap-vol/config/external-application.properties" -d phase4-scsb-mock-las-server

 Example -

Request  For Request Item

Code Block
{
  "author": "Mathematische Poetik   ",
  "bibId": "15",
  "callNumber": "P311.xM315",
  "chapterTitle": "Mathematische Poetik / von Solomon Marcus ; aus dem Rumaenichen uebertragen von Edith Mandroiu.",
  "deliveryLocation": "PA",
  "emailAddress": "test@gmail.com",
  "endPage": "",
  "issue": "",
  "itemBarcodes": [
    "32101074849843"
  ],
  "itemOwningInstitution": "PUL",
  "patronBarcode": "45678912",
  "requestNotes": "Test",
  "requestType": "RETRIEVAL",
  "requestingInstitution": "PUL",
  "startPage": "",
  "titleIdentifier": "",
  "trackingId": "",
  "username": "",
  "volume": ""
}

Response for Request Item

Code Block
{
  "patronBarcode": "45678912",
  "itemBarcodes": [
    "32101074849843"
  ],
  "requestType": "RETRIEVAL",
  "deliveryLocation": "PA",
  "requestingInstitution": "PUL",
  "bibliographicId": null,
  "expirationDate": null,
  "screenMessage": "Message received, your request will be processed",
  "success": true,
  "emailAddress": "test@gmail.com",
  "titleIdentifier": ""
}