paws-r / paws

Paws, a package for Amazon Web Services in R
https://www.paws-r-sdk.com
Other
314 stars 37 forks source link

Fix paws.common Unit test on CRAN #632

Closed DyfanJones closed 1 year ago

DyfanJones commented 1 year ago

Dear maintainer,

Please see the problems shown on https://cran.r-project.org/web/checks/check_results_paws.common.html.

Please correct before 2023-07-07 to safely retain your package on CRAN.

It seems we need to remind you of the CRAN policy:

'Packages which use Internet resources should fail gracefully with an informative message if the resource is not available or has changed (and not give a check warning nor error).'

This needs correction whether or not the resource recovers.

https://www.r-project.org/nosvn/R.check/r-devel-windows-x86_64/paws.common-00check.html

checking tests ... [25s] ERROR
  Running 'testthat.R' [24s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(paws.common)
  >
  > test_check("paws.common")
  [ FAIL 3 | WARN 0 | SKIP 9 | PASS 739 ]

  ══ Skipped tests (9) ═══════════════════════════════════════════════════════════
  • (1): 'test_handlers_query.R:88:3'
  • On CRAN (4): 'test_handlers_rest.R:28:3', 'test_net.R:3:3',
    'test_net.R:30:3', 'test_net.R:43:3'
  • skip (4): 'test_handlers_ec2query.R:371:3', 'test_handlers_jsonrpc.R:277:3',
    'test_handlers_jsonrpc.R:547:3', 'test_handlers_restxml.R:692:3'

  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test_net.R:63:3'): write content to disk ──────────────────────────
  resp$status_code not equal to 200.
  1/1 mismatches
  [1] 504 - 200 == 304
  ── Failure ('test_net.R:65:3'): write content to disk ──────────────────────────
  `body <- jsonlite::fromJSON(tmp)` threw an error.
  Message: lexical error: invalid char in json text.
                                         <html> <head><title>504 Gatewa
                       (right here) ------^

  Class: simpleError/error/condition
  Backtrace:
      ▆
   1. ├─testthat::expect_error(body <- jsonlite::fromJSON(tmp), NA) at test_net.R:65:2
   2. │ └─testthat:::quasi_capture(...)
   3. │ ├─testthat (local) .capture(...)
   4. │ │ └─base::withCallingHandlers(...)
   5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─jsonlite::fromJSON(tmp)
   7. └─jsonlite:::parse_and_simplify(...)
   8. └─jsonlite:::parseJSON(txt, bigint_as_char)
   9. └─jsonlite:::parse_con(txt, bigint_as_char)
  ── Error ('test_net.R:66:3'): write content to disk ────────────────────────────
  <notSubsettableError/error/condition>
  Error in `body$slideshow`: object of type 'closure' is not subsettable
  Backtrace:
      ▆
   1. └─testthat::expect_equal(body$slideshow$title, "Sample Slide Show") at test_net.R:66:2
   2. └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. └─rlang::eval_bare(expr, quo_get_env(quo))

  [ FAIL 3 | WARN 0 | SKIP 9 | PASS 739 ]