Running ‘testthat.R’ [3s/439s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("rglobi")
  Loading required package: rglobi
  ── 1. Error: default prey (@test-globi.R#4)  ───────────────────────────────────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Homo%20sapiens&interactionType=preysOn&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_prey_of() at testthat/test-globi.R:4
  2: get_interactions(taxon, ...)
  3: get_interactions_by_taxa(sourcetaxon = taxon, interactiontype = interaction.type, 
         ...)
  4: read_csv(requesturl)
  5: utils::download.file(url, tf, quiet = TRUE)
  
  ── 2. Error: prey of Ariopsis felis (@test-globi.R#10)  ────────────────────────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Ariopsis%20felis&interactionType=preysOn&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_prey_of("Ariopsis felis") at testthat/test-globi.R:10
  2: get_interactions(taxon, ...)
  3: get_interactions_by_taxa(sourcetaxon = taxon, interactiontype = interaction.type, 
         ...)
  4: read_csv(requesturl)
  5: utils::download.file(url, tf, quiet = TRUE)
  
  ── 3. Error: predator of rats (@test-globi.R#15)  ──────────────────────────────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Rattus%20rattus&interactionType=preyedUponBy&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_predators_of("Rattus rattus") at testthat/test-globi.R:15
  2: get_interactions(taxon, "preyedUponBy", ...)
  3: get_interactions_by_taxa(sourcetaxon = taxon, interactiontype = interaction.type, 
         ...)
  4: read_csv(requesturl)
  5: utils::download.file(url, tf, quiet = TRUE)
  
  ── 4. Error: cypher query (@test-globi.R#20)  ──────────────────────────────────
  unexpected character '<'
  1: query("START taxon = node:taxons(name='Homo sapiens') RETURN taxon.name as `name`, taxon.path as `path` LIMIT 1") at testthat/test-globi.R:20
  2: rjson::fromJSON(h$value())
  3: stop(x)
  
  ── 5. Error: no result cypher query (@test-globi.R#28)  ────────────────────────
  unexpected character '<'
  1: query("START predatorTaxon = node:taxons(name='Calisto hysius') MATCH preyTaxon<-[:CLASSIFIED_AS]-prey<-[:ATE|PREYED_ON]-predator-[:CLASSIFIED_AS]->predatorTaxon WHERE has(preyTaxon.path) RETURN distinct(preyTaxon.name), preyTaxon.path as `prey.taxon.path`") at testthat/test-globi.R:28
  2: rjson::fromJSON(h$value())
  3: stop(x)
  
  ── 6. Error: interactions returned based on species (@test-globi.R#37)  ────────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Rattus%20rattus&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_interactions_by_taxa(sourcetaxon = "Rattus rattus") at testthat/test-globi.R:37
  2: read_csv(requesturl)
  3: utils::download.file(url, tf, quiet = TRUE)
  
  ── 7. Error: interactions subsetted by adding additional information (@test-glob
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Rattus%20rattus&interactionType=eats&interactionType=eatenBy&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_interactions_by_taxa(sourcetaxon = "Rattus rattus", interactiontype = interaction_types) at testthat/test-globi.R:45
  2: read_csv(requesturl)
  3: utils::download.file(url, tf, quiet = TRUE)
  
  ── 8. Error: interactions subsetted by adding additional information all interac
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Rattus%20rattus&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_interactions_by_taxa(sourcetaxon = "Rattus rattus") at testthat/test-globi.R:54
  2: read_csv(requesturl)
  3: utils::download.file(url, tf, quiet = TRUE)
  
  ── 9. Error: interactions subsetted by adding additional information all interac
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Rattus%20rattus&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=t&type=csv'
  1: get_interactions_by_taxa(sourcetaxon = "Rattus rattus", returnobservations = T) at testthat/test-globi.R:64
  2: read_csv(requesturl)
  3: utils::download.file(url, tf, quiet = TRUE)
  
  ── 10. Error: interactions subsetted by adding additional information using othe
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Rattus%20rattus&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_interactions_by_taxa(sourcetaxon = "Rattus rattus") at testthat/test-globi.R:71
  2: read_csv(requesturl)
  3: utils::download.file(url, tf, quiet = TRUE)
  
  ── 11. Error: interaction in area (@test-globi.R#99)  ──────────────────────────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=-97,17.5,-81,31&&includeObservations=f&type=csv'
  1: get_interactions_in_area(bbox = c(-97, 17.5, -81, 31)) at testthat/test-globi.R:99
  2: get_interactions_by_taxa(sourcetaxon = NULL, bbox = bbox, ...)
  3: read_csv(requesturl)
  4: utils::download.file(url, tf, quiet = TRUE)
  
  ── 12. Error: interaction matrix can be retrieved (@test-globi.R#105)  ─────────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Homo%20sapiens&targetTaxon=Mammalia&targetTaxon=Aves&interactionType=eats&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_interaction_matrix(source.taxon.names = list("Homo sapiens"), target.taxon.names = list("Mammalia", 
         "Aves")) at testthat/test-globi.R:105
  2: Reduce(function(accum, source.taxon.name) rbind(accum, unique_target_taxa_of_source_taxon(source.taxon.name, 
         target.taxon.names, interaction.type, opts = opts)), source.taxon.names, init = data.frame())
  3: f(init, x[[i]])
  4: rbind(accum, unique_target_taxa_of_source_taxon(source.taxon.name, target.taxon.names, 
         interaction.type, opts = opts))
  5: unique_target_taxa_of_source_taxon(source.taxon.name, target.taxon.names, interaction.type, 
         opts = opts)
  6: get_interactions_by_taxa(sourcetaxon = source.taxon.name, interactiontype = interaction.type, 
         targettaxon = target.taxon.names, opts = opts)
  7: read_csv(requesturl)
  8: utils::download.file(url, tf, quiet = TRUE)
  
  ── 13. Error: interaction matrix with interaction type can be retrieved (@test-g
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&sourceTaxon=Cymothoa%20excisa&targetTaxon=Micropogonias%20undulatus&interactionType=parasiteOf&field=source_taxon_external_id&field=source_taxon_name&field=source_taxon_path&field=source_specimen_life_stage&field=interaction_type&field=target_taxon_external_id&field=target_taxon_name&field=target_taxon_path&field=target_specimen_life_stage&field=latitude&field=longitude&field=study_citation&field=study_external_id&field=study_source_citation&bbox=&includeObservations=f&type=csv'
  1: get_interaction_matrix(list("Cymothoa excisa"), list("Micropogonias undulatus"), 
         "parasiteOf") at testthat/test-globi.R:112
  2: Reduce(function(accum, source.taxon.name) rbind(accum, unique_target_taxa_of_source_taxon(source.taxon.name, 
         target.taxon.names, interaction.type, opts = opts)), source.taxon.names, init = data.frame())
  3: f(init, x[[i]])
  4: rbind(accum, unique_target_taxa_of_source_taxon(source.taxon.name, target.taxon.names, 
         interaction.type, opts = opts))
  5: unique_target_taxa_of_source_taxon(source.taxon.name, target.taxon.names, interaction.type, 
         opts = opts)
  6: get_interactions_by_taxa(sourcetaxon = source.taxon.name, interactiontype = interaction.type, 
         targettaxon = target.taxon.names, opts = opts)
  7: read_csv(requesturl)
  8: utils::download.file(url, tf, quiet = TRUE)
  
  ── 14. Error: interactions can be retrieved by type (@test-globi.R#117)  ───────
  cannot open URL 'https://api.globalbioticinteractions.org:443/interaction?&interactionType=eats&interactionType=eatenBy&field=source_taxon_name&field=interaction_type&field=target_taxon_name&limit=5&bbox=&includeObservations=f&type=csv'
  1: rglobi::get_interactions_by_type(interactiontype = c("eats", "eatenBy"), showfield = c("source_taxon_name", 
         "interaction_type", "target_taxon_name"), otherkeys = list(limit = 5)) at testthat/test-globi.R:117
  2: get_interactions_by_taxa(sourcetaxon = NULL, interactiontype = interactiontype, ...)
  3: read_csv(requesturl)
  4: utils::download.file(url, tf, quiet = TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 15 SKIPPED: 2 FAILED: 14
  1. Error: default prey (@test-globi.R#4) 
  2. Error: prey of Ariopsis felis (@test-globi.R#10) 
  3. Error: predator of rats (@test-globi.R#15) 
  4. Error: cypher query (@test-globi.R#20) 
  5. Error: no result cypher query (@test-globi.R#28) 
  6. Error: interactions returned based on species (@test-globi.R#37) 
  7. Error: interactions subsetted by adding additional information (@test-globi.R#45) 
  8. Error: interactions subsetted by adding additional information all interaction types (@test-globi.R#54) 
  9. Error: interactions subsetted by adding additional information all interaction types include observations (@test-globi.R#64) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted