dpn-admin/dpn-sync

View on GitHub
fixtures/vcr_cassettes/DPN_Workers_SyncReplications/behaves_like_sync_registry_object_success/_sync/success/records_success_timestamp.yml

Summary

Maintainability
Test Coverage
---
http_interactions:
- request:
    method: get
    uri: http://localhost:3001/api-v2/bag/?admin_node=aptrust&after=2000-01-01%2000:00:00%20UTC&bag_type=I&page=1&page_size=25
    body:
      encoding: UTF-8
      string: 'null'
    headers:
      User-Agent:
      - dpn-client-aptrust (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token aptrust_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"3ccdf7921aa83b388604ce6b2909473b"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - 76c11286-9b36-4ef0-a4fe-e58181cfb8e8
      X-Runtime:
      - '0.018143'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '67'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"count":0,"next":null,"previous":null,"results":[],"total_size":0}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: get
    uri: http://localhost:3001/api-v2/bag/?admin_node=aptrust&after=2000-01-01%2000:00:00%20UTC&bag_type=R&page=1&page_size=25
    body:
      encoding: UTF-8
      string: 'null'
    headers:
      User-Agent:
      - dpn-client-aptrust (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token aptrust_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"3ccdf7921aa83b388604ce6b2909473b"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - 6490c4d0-4242-443a-9350-a5e2654fc118
      X-Runtime:
      - '0.020940'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '67'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"count":0,"next":null,"previous":null,"results":[],"total_size":0}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: get
    uri: http://localhost:3001/api-v2/bag/?admin_node=aptrust&after=2000-01-01%2000:00:00%20UTC&bag_type=D&page=1&page_size=25
    body:
      encoding: UTF-8
      string: 'null'
    headers:
      User-Agent:
      - dpn-client-aptrust (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token aptrust_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"4e604635a6c7ac4ac21d61aa66cdda69"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - 2de8f656-2315-4fa9-8425-dc8944c55ea0
      X-Runtime:
      - '0.023554'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '480'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"count":1,"next":null,"previous":null,"results":[{"uuid":"00000000-0000-4000-a000-000000000001","local_id":"APTrust
        Bag 1","size":71680,"version":1,"created_at":"2015-09-15T17:56:03Z","updated_at":"2015-09-15T17:56:03Z","ingest_node":"aptrust","admin_node":"aptrust","member":"9a000000-0000-4000-a000-000000000001","interpretive":[],"rights":[],"replicating_nodes":["chron","hathi"],"bag_type":"D","first_version_uuid":"00000000-0000-4000-a000-000000000001"}],"total_size":71680}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: post
    uri: http://localhost:3004/api-v2/bag/
    body:
      encoding: UTF-8
      string: '{"uuid":"00000000-0000-4000-a000-000000000001","local_id":"APTrust
        Bag 1","size":71680,"version":1,"created_at":"2015-09-15T17:56:03Z","updated_at":"2015-09-15T17:56:03Z","ingest_node":"aptrust","admin_node":"aptrust","member":"9a000000-0000-4000-a000-000000000001","interpretive":[],"rights":[],"replicating_nodes":["chron","hathi"],"bag_type":"D","first_version_uuid":"00000000-0000-4000-a000-000000000001"}'
    headers:
      User-Agent:
      - dpn-client-sdr (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token sdr_token
  response:
    status:
      code: 409
      message: 'Conflict '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - text/plain; charset=utf-8
      Cache-Control:
      - no-cache
      X-Request-Id:
      - 1f28c0e0-c0db-4a91-871d-ae8df8b39cd8
      X-Runtime:
      - '0.012920'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '0'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: ''
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: put
    uri: http://localhost:3004/api-v2/bag/00000000-0000-4000-a000-000000000001/
    body:
      encoding: UTF-8
      string: '{"uuid":"00000000-0000-4000-a000-000000000001","local_id":"APTrust
        Bag 1","size":71680,"version":1,"created_at":"2015-09-15T17:56:03Z","updated_at":"2015-09-15T17:56:03Z","ingest_node":"aptrust","admin_node":"aptrust","member":"9a000000-0000-4000-a000-000000000001","interpretive":[],"rights":[],"replicating_nodes":["chron","hathi"],"bag_type":"D","first_version_uuid":"00000000-0000-4000-a000-000000000001"}'
    headers:
      User-Agent:
      - dpn-client-sdr (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token sdr_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"57abd2cc9613dd625b7a73beda849ade"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - 2841edad-9428-40bc-b9f6-ef8743afd807
      X-Runtime:
      - '0.035722'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '409'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"uuid":"00000000-0000-4000-a000-000000000001","local_id":"APTrust
        Bag 1","size":71680,"version":1,"created_at":"2015-09-15T17:56:03Z","updated_at":"2016-12-15T23:50:10Z","ingest_node":"aptrust","admin_node":"aptrust","member":"9a000000-0000-4000-a000-000000000001","interpretive":[],"rights":[],"replicating_nodes":["chron","hathi"],"bag_type":"D","first_version_uuid":"00000000-0000-4000-a000-000000000001"}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: get
    uri: http://localhost:3004/api-v2/node/sdr/
    body:
      encoding: UTF-8
      string: 'null'
    headers:
      User-Agent:
      - dpn-client-sdr (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token sdr_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"936e7842e2466d864bb8232c93307eaa"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - b1d41342-c96e-4cf5-a050-151a7ad75018
      X-Runtime:
      - '0.022115'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '425'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"name":"Stanford Digital Repository","namespace":"sdr","api_root":"http://127.0.0.1:3004","ssh_pubkey":null,"created_at":"2015-09-15T17:39:46Z","updated_at":"2015-09-15T17:39:46Z","replicate_from":["aptrust","hathi","chron","tdr"],"replicate_to":["tdr","hathi","chron","aptrust"],"restore_from":[],"restore_to":[],"protocols":["rsync"],"fixity_algorithms":["sha256"],"storage":{"region":"california","type":"magnetic
        disk"}}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: get
    uri: http://localhost:3004/api-v2/bag/?admin_node=aptrust&page=1&page_size=25
    body:
      encoding: UTF-8
      string: 'null'
    headers:
      User-Agent:
      - dpn-client-sdr (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token sdr_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"0acc12f6d1956587fc55124e9be148b3"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - 502af590-bf18-412a-80dc-71a0b19c4d41
      X-Runtime:
      - '0.032327'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '480'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"count":1,"next":null,"previous":null,"results":[{"uuid":"00000000-0000-4000-a000-000000000001","local_id":"APTrust
        Bag 1","size":71680,"version":1,"created_at":"2015-09-15T17:56:03Z","updated_at":"2016-12-15T23:50:10Z","ingest_node":"aptrust","admin_node":"aptrust","member":"9a000000-0000-4000-a000-000000000001","interpretive":[],"rights":[],"replicating_nodes":["chron","hathi"],"bag_type":"D","first_version_uuid":"00000000-0000-4000-a000-000000000001"}],"total_size":71680}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: get
    uri: http://localhost:3001/api-v2/replicate/?bag=00000000-0000-4000-a000-000000000001&from_node=aptrust&page=1&page_size=25&to_node=sdr
    body:
      encoding: UTF-8
      string: 'null'
    headers:
      User-Agent:
      - dpn-client-aptrust (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token aptrust_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"070190ac6ef67f7863f922df0bbcdadf"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - fd9c30e7-8f67-4aec-91b0-de1e4ae7e3b7
      X-Runtime:
      - '0.015861'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '633'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"count":1,"next":null,"previous":null,"results":[{"replication_id":"10000000-0000-4111-a000-000000000013","fixity_nonce":null,"fixity_value":"e39a201a88bc3d7803a5e375d9752439d328c2e85b4f1ba70a6d984b6c5378bd","cancel_reason":null,"cancel_reason_detail":null,"link":"/data/src/dlss/dpn/dpn-server/test/fixtures/integration/testbags/00000000-0000-4000-a000-000000000001.tar","created_at":"2015-09-15T19:38:31Z","updated_at":"2016-12-15T23:50:09Z","store_requested":true,"stored":false,"cancelled":false,"bag":"00000000-0000-4000-a000-000000000001","fixity_algorithm":"sha256","protocol":"rsync","from_node":"aptrust","to_node":"sdr"}]}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: post
    uri: http://localhost:3004/api-v2/replicate/
    body:
      encoding: UTF-8
      string: '{"replication_id":"10000000-0000-4111-a000-000000000013","fixity_nonce":null,"fixity_value":"e39a201a88bc3d7803a5e375d9752439d328c2e85b4f1ba70a6d984b6c5378bd","cancel_reason":null,"cancel_reason_detail":null,"link":"/data/src/dlss/dpn/dpn-server/test/fixtures/integration/testbags/00000000-0000-4000-a000-000000000001.tar","created_at":"2015-09-15T19:38:31Z","updated_at":"2016-12-15T23:50:09Z","store_requested":true,"stored":false,"cancelled":false,"bag":"00000000-0000-4000-a000-000000000001","fixity_algorithm":"sha256","protocol":"rsync","from_node":"aptrust","to_node":"sdr"}'
    headers:
      User-Agent:
      - dpn-client-sdr (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token sdr_token
  response:
    status:
      code: 409
      message: 'Conflict '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - text/plain; charset=utf-8
      Cache-Control:
      - no-cache
      X-Request-Id:
      - d38b43a0-3000-4b50-8809-ce00410a4f02
      X-Runtime:
      - '0.010093'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '0'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: ''
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
- request:
    method: put
    uri: http://localhost:3004/api-v2/replicate/10000000-0000-4111-a000-000000000013/
    body:
      encoding: UTF-8
      string: '{"replication_id":"10000000-0000-4111-a000-000000000013","fixity_nonce":null,"fixity_value":"e39a201a88bc3d7803a5e375d9752439d328c2e85b4f1ba70a6d984b6c5378bd","cancel_reason":null,"cancel_reason_detail":null,"link":"/data/src/dlss/dpn/dpn-server/test/fixtures/integration/testbags/00000000-0000-4000-a000-000000000001.tar","created_at":"2015-09-15T19:38:31Z","updated_at":"2016-12-15T23:50:09Z","store_requested":true,"stored":false,"cancelled":false,"bag":"00000000-0000-4000-a000-000000000001","fixity_algorithm":"sha256","protocol":"rsync","from_node":"aptrust","to_node":"sdr"}'
    headers:
      User-Agent:
      - dpn-client-sdr (2.8.2.4, ruby 2.3.1 (2016-04-26))
      Accept:
      - "*/*"
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Type:
      - application/json
      Authorization:
      - Token sdr_token
  response:
    status:
      code: 200
      message: 'OK '
    headers:
      X-Frame-Options:
      - SAMEORIGIN
      X-Xss-Protection:
      - 1; mode=block
      X-Content-Type-Options:
      - nosniff
      Content-Type:
      - application/json; charset=utf-8
      Etag:
      - W/"066066ce18d5d61a3c5249585142aaa6"
      Cache-Control:
      - max-age=0, private, must-revalidate
      X-Request-Id:
      - 14f24766-4044-41a4-9a2f-236292ffdbca
      X-Runtime:
      - '0.019912'
      Server:
      - WEBrick/1.3.1 (Ruby/2.3.1/2016-04-26)
      Date:
      - Thu, 15 Dec 2016 23:50:20 GMT
      Content-Length:
      - '581'
      Connection:
      - Keep-Alive
    body:
      encoding: UTF-8
      string: '{"replication_id":"10000000-0000-4111-a000-000000000013","fixity_nonce":null,"fixity_value":"e39a201a88bc3d7803a5e375d9752439d328c2e85b4f1ba70a6d984b6c5378bd","cancel_reason":null,"cancel_reason_detail":null,"link":"/data/src/dlss/dpn/dpn-server/test/fixtures/integration/testbags/00000000-0000-4000-a000-000000000001.tar","created_at":"2015-09-15T19:38:31Z","updated_at":"2016-12-15T23:50:09Z","store_requested":true,"stored":false,"cancelled":false,"bag":"00000000-0000-4000-a000-000000000001","fixity_algorithm":"sha256","protocol":"rsync","from_node":"aptrust","to_node":"sdr"}'
    http_version: 
  recorded_at: Thu, 15 Dec 2016 23:50:20 GMT
recorded_with: VCR 3.0.3