AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
40 stars 2 forks source link

Tests failing on CRAN for `show_values()` when API is down #184

Closed mjwestgate closed 11 months ago

mjwestgate commented 1 year ago

Another round of automated checks has failed on CRAN, meaning we need to update by 2023-03-11 to keep {galah} on CRAN. Issue is:

  ── Failure ('test-international-Sweden.R:60'): search_all(fields) 
works for Sweden ──
   nrow(x) is not more than 1. Difference: -1
   ── Error ('test-international-Sweden.R:73'): show_values works for 
Sweden ──────
   Error in `if (!(field %in% show_all_fields()$id)) {
       bullets <- c("Unknown field detected.", i = "Search for the valid 
name of a desired field with `search_fields()`.")
       abort(bullets, call = caller_env())
   }`: argument is of length zero
   Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-international-Sweden.R:73:2
    2. │ └─cassette$call_block(...)
    3. └─galah::show_values(search_fields("basisOfRecord")) at 
test-international-Sweden.R:74:4
    4.   ├─base::do.call(paste0("show_values_", type), args)
    5.   └─galah:::show_values_field(field = NULL)

What appears to be happening here is:

Some potential solutions: