nims-dpfc / nims-hyrax

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI test failures

Steven-Eardley opened this issue · comments

Our current failing tests on CodeShip:

Failures:

1) PublicationIndexer indexes a date active triple resource with all the attributes indexes as displayable
Failure/Error: expect(@solr_document).to include('complex_date_ssm')

  expected {"system_create_dtsi" => "2019-03-28T05:21:38Z", "system_modified_dtsi" => "2019-03-28T05:21:38Z", "has_m...me_tesim" => [], "human_readable_type_sim" => "Publication", "human_readable_type_tesim" => "Publication"} to include "complex_date_ssm"
  Diff:
  @@ -1,2 +1,37 @@
  -["complex_date_ssm"]
  +"admin_set_sim" => "",
  +"admin_set_tesim" => "",
  +"complex_event_place_tesim" => [],
  +"complex_event_ssm" => "[]",
  +"complex_event_title_tesim" => [],
  +"complex_identifier_ssim" => [],
  +"complex_identifier_ssm" => "[]",
  +"complex_person_sim" => [],
  +"complex_person_ssm" => "[]",
  +"complex_person_tesim" => [],
  +"complex_rights_sim" => [],
  +"complex_rights_ssm" => "[]",
  +"complex_source_issue_tesim" => [],
  +"complex_source_sequence_number_tesim" => [],
  +"complex_source_ssm" => "[]",
  +"complex_source_title_sim" => [],
  +"complex_source_title_tesim" => [],
  +"complex_source_volume_tesim" => [],
  +"complex_version_ssim" => [],
  +"complex_version_ssm" => "[]",
  +"file_set_ids_ssim" => [],
  +"generic_type_sim" => ["Work"],
  +"has_model_ssim" => ["Publication"],
  +"human_readable_type_sim" => "Publication",
  +"human_readable_type_tesim" => "Publication",
  +"member_ids_ssim" => [],
  +"member_of_collection_ids_ssim" => [],
  +"member_of_collections_ssim" => [],
  +"suppressed_bsi" => false,
  +"system_create_dtsi" => "2019-03-28T05:21:38Z",
  +"system_modified_dtsi" => "2019-03-28T05:21:38Z",
  +"thumbnail_path_ss" => "/assets/work-ff055336041c3f7d310ad69109eda4a887b16ec501f35afc0a547c4adb97ee72.png",
  +"title_sim" => ["Publication"],
  +"title_tesim" => ["Publication"],
  +"visibility_ssi" => "restricted",
  +:id => nil,
  
# ./spec/indexers/publication_indexer_spec.rb:30:in `block (3 levels) in <top (required)>'

2) PublicationIndexer indexes a date active triple resource with all the attributes indexes as dateable
Failure/Error:
  expect(@solr_document['complex_date_dtsim']).to match_array(
    ["1988-10-28T00:00:00Z", "2018-01-01T00:00:00Z"])

  expected a collection that can be converted to an array with `#to_ary` or `#to_a`, but got nil
# ./spec/indexers/publication_indexer_spec.rb:34:in `block (3 levels) in <top (required)>'

3) PublicationIndexer indexes a date active triple resource with all the attributes indexes each type as dateable
Failure/Error: expect(@solr_document['complex_date_submitted_dtsim']).to match_array(["1988-10-28T00:00:00Z"])
  expected a collection that can be converted to an array with `#to_ary` or `#to_a`, but got nil
# ./spec/indexers/publication_indexer_spec.rb:42:in `block (3 levels) in <top (required)>'

4) PublicationIndexer indexes a date active triple resource with all the attributes indexes each type as displayable
Failure/Error: expect(@solr_document['complex_date_submitted_ssm']).to match_array(["1988-10-28"])
  expected a collection that can be converted to an array with `#to_ary` or `#to_a`, but got nil
# ./spec/indexers/publication_indexer_spec.rb:45:in `block (3 levels) in <top (required)>'

5) IdentifierService#select_active_options returns active terms
Failure/Error:
  expect(service.select_active_options).to include(
    ["eduPersonTargetedID", "edu person targeted id"],
    ["Referred Data Identifier - Local", "referred data identifier local"])

  expected [["Identifier - Local", "identifier local"], ["Identifier - Persistent", "identifier persistent"], ["...ail image url"], ["Web Image URL", "web image url"], ["Previous identifier", "previous identifier"]] to include ["Referred Data Identifier - Local", "referred data identifier local"]
# ./spec/services/identifier_service_spec.rb:8:in `block (3 levels) in <top (required)>'

6) IdentifierService find_by_id returns active term matching id
Failure/Error:
  expect(service.find_by_id('referred data identifier local')).to eq({
    "label" => "Referred Data Identifier - Local",
    "id" => "referred data identifier local",
    "active" => true
  })

  expected: {"label"=>"Referred Data Identifier - Local", "id"=>"referred data identifier local", "active"=>true}
       got: {}

  (compared using ==)

  Diff:
  @@ -1,4 +1 @@
  -"active" => true,
  -"id" => "referred data identifier local",
  -"label" => "Referred Data Identifier - Local",
  
# ./spec/services/identifier_service_spec.rb:16:in `block (3 levels) in <top (required)>'

7) IdentifierService find_by_label returns active term  matching label
Failure/Error:
  expect(service.find_by_label('Referred Data Identifier - Local')).to eq({
    "label" => "Referred Data Identifier - Local",
    "id" => "referred data identifier local",
    "active" => true
  })

  expected: {"label"=>"Referred Data Identifier - Local", "id"=>"referred data identifier local", "active"=>true}
       got: {}

  (compared using ==)

  Diff:
  @@ -1,4 +1 @@
  -"active" => true,
  -"id" => "referred data identifier local",
  -"label" => "Referred Data Identifier - Local",
  
# ./spec/services/identifier_service_spec.rb:26:in `block (3 levels) in <top (required)>'

8) IdentifierService find_by_id_or_label returns active term matching id or label
Failure/Error:
  expect(service.find_by_id_or_label('Referred Data Identifier - Local')).to eq({
    "label" => "Referred Data Identifier - Local",
    "id" => "referred data identifier local",
    "active" => true
  })

  expected: {"label"=>"Referred Data Identifier - Local", "id"=>"referred data identifier local", "active"=>true}
       got: {}

  (compared using ==)

  Diff:
  @@ -1,4 +1 @@
  -"active" => true,
  -"id" => "referred data identifier local",
  -"label" => "Referred Data Identifier - Local",
  
# ./spec/services/identifier_service_spec.rb:36:in `block (3 levels) in <top (required)>'

Finished in 2 minutes 16.5 seconds (files took 23.54 seconds to load)
483 examples, 8 failures, 35 pending

Failed examples:

rspec ./spec/indexers/publication_indexer_spec.rb:29 # PublicationIndexer indexes a date active triple resource with all the attributes indexes as displayable
rspec ./spec/indexers/publication_indexer_spec.rb:33 # PublicationIndexer indexes a date active triple resource with all the attributes indexes as dateable
rspec ./spec/indexers/publication_indexer_spec.rb:41 # PublicationIndexer indexes a date active triple resource with all the attributes indexes each type as dateable
rspec ./spec/indexers/publication_indexer_spec.rb:44 # PublicationIndexer indexes a date active triple resource with all the attributes indexes each type as displayable
rspec ./spec/services/identifier_service_spec.rb:7 # IdentifierService#select_active_options returns active terms
rspec ./spec/services/identifier_service_spec.rb:15 # IdentifierService find_by_id returns active term matching id
rspec ./spec/services/identifier_service_spec.rb:25 # IdentifierService find_by_label returns active term  matching label
rspec ./spec/services/identifier_service_spec.rb:35 # IdentifierService find_by_id_or_label returns active term matching id or label

We got through these, tests have been passing for some time now.