Running ‘testthat.R’ [22s/68s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mapme.biodiversity)
  > library(pbapply)
  > 
  > pboptions(type = "none")
  > test_check("mapme.biodiversity")
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Argument 'min_cover' for resource 'treecover' was not specified. Setting to default value of '30'.
  Argument 'range_traveltime' for resource 'traveltime' was not specified. Setting to default value of '20k_50k'.
  Starting process to download resource 'traveltime'........
  Starting process to download resource 'traveltime'........
  The selected range 'not-available' is not available ranges for traveltime Available ranges are 5k_10k, 10k_20k, 20k_50k, 50k_100k, 100k_200k, 200k_500k, 500k_1mio, 1mio_5mio, 50k_50mio, 5k_110mio, 20k_110mio.
  <simpleError in .get_traveltime_url(range_traveltime, filenames): No supoorted ranges have been specified.>
  <simpleWarning: Download for resource traveltime failed. Returning unmodified portfolio object.>
  Starting process to download resource 'traveltime'........
  The selected ranges 'not-available', 'not-available2' are not available ranges for traveltime Available ranges are 5k_10k, 10k_20k, 20k_50k, 50k_100k, 100k_200k, 200k_500k, 500k_1mio, 1mio_5mio, 50k_50mio, 5k_110mio, 20k_110mio.
  <simpleError in .get_traveltime_url(range_traveltime, filenames): No supoorted ranges have been specified.>
  <simpleWarning: Download for resource traveltime failed. Returning unmodified portfolio object.>
  Starting process to download resource 'traveltime'........
  The selected range 'not-available' is not available ranges for traveltime Available ranges are 5k_10k, 10k_20k, 20k_50k, 50k_100k, 100k_200k, 200k_500k, 500k_1mio, 1mio_5mio, 50k_50mio, 5k_110mio, 20k_110mio.
  Reduced to the available range of 20k_50k.
  Starting process to download resource 'greenhouse'........
  Starting process to download resource 'lossyear'........
  <simpleError: Wrong version specified for lossyear resource. Select one of GFC-2015-v1.3.Wrong version specified for lossyear resource. Select one of GFC-2016-v1.4.Wrong version specified for lossyear resource. Select one of GFC-2017-v1.5.Wrong version specified for lossyear resource. Select one of GFC-2018-v1.6.Wrong version specified for lossyear resource. Select one of GFC-2019-v1.7.Wrong version specified for lossyear resource. Select one of GFC-2020-v1.8.>
  <simpleWarning: Download for resource lossyear failed. Returning unmodified portfolio object.>
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Starting process to download resource 'treecover2000'........
  Skipping existing files in output directory.
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Skipping existing files in output directory.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Starting process to download resource 'lossyear'........
  <simpleError: Wrong version specified for lossyear resource. Select one of GFC-2015-v1.3.Wrong version specified for lossyear resource. Select one of GFC-2016-v1.4.Wrong version specified for lossyear resource. Select one of GFC-2017-v1.5.Wrong version specified for lossyear resource. Select one of GFC-2018-v1.6.Wrong version specified for lossyear resource. Select one of GFC-2019-v1.7.Wrong version specified for lossyear resource. Select one of GFC-2020-v1.8.>
  <simpleWarning: Download for resource lossyear failed. Returning unmodified portfolio object.>
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Skipping existing files in output directory.
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Starting process to download resource 'treecover2000'........
  <simpleError: Wrong version specified for treecover resource. Select one of GFC-2015-v1.3, GFC-2016-v1.4, GFC-2017-v1.5, GFC-2018-v1.6, GFC-2019-v1.7, GFC-2020-v1.8.>
  <simpleWarning: Download for resource treecover2000 failed. Returning unmodified portfolio object.>
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Starting process to download resource 'worldpop'........
  <simpleError in open.connection(x, "rb"): Timeout was reached: [data.chc.ucsb.edu] Connection timeout after 10001 ms>
  <simpleWarning: Download for resource chirps failed. Returning unmodified portfolio object.>
  The following requested resource is already available: treecover2000.
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Some target years are not available for treecover.
  Some target years are not available for treecover.
  [ FAIL 3 | WARN 2 | SKIP 25 | PASS 105 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (25)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-get_chirps.R:27:3): .get_chirps works ───────────────────────────
  `basename(get_resources(portfolio, "chirps"))` threw an unexpected error.
  Message: a character vector argument expected
  Class:   simpleError/error/condition
  ── Error (test-portfolio.R:126:3): init_portfolio works ────────────────────────
  ``%>%`(...)` threw an unexpected error.
  Message: The following required resource is not available: chirps.
  Class:   simpleError/error/condition
  ── Error (test-portfolio.R:132:3): init_portfolio works ────────────────────────
  `read_portfolio(tmpfile)` threw an unexpected error.
  Message: Open failed.
  
  Class:   Rcpp::exception/C++Error/error/condition
  
  [ FAIL 3 | WARN 2 | SKIP 25 | PASS 105 ]
  Error: Test failures
  In addition: Warning messages:
  1: In for (nme in names(lhs)) { :
    closing unused connection 5 (https://data.chc.ucsb.edu/products/CHIRPS-2.0/global_monthly/cogs/)
  2: In for (c in class) { :
    closing unused connection 4 (https://data.chc.ucsb.edu/products/CHIRPS-2.0/global_monthly/cogs/)
  Execution halted