Re: Test suite error in webfakes
Thanks a lot for your quick response, Andreas.
On Tue, Aug 17, 2021 at 01:49:07PM +0200, Gábor Csárdi wrote:
> Hi,
>
> the webfakes test suite does not need internet, so this must be something else.
> I have opened an issue here: https://github.com/r-lib/webfakes/issues/79
>
> Gabor
>
> On Tue, Aug 17, 2021 at 1:25 PM Andreas Tille <andreas@an3as.eu> wrote:
> >
> > Hi Gábor,
> >
> > I intend to package webfakes for Debian to enable a full test suite in
> > some of our packages. Unfortunately the webfakes test suite itself
> > has some issue when running it inside a restricted environment (with
> > no internet access and no graphical interface) as it is done as default
> > in CI in Debian. There is a full test log[1] which shows in line 745:
> >
> >
> > ══ Failed tests ════════════════════════════════════════════════════════════════
> > ── Error (test-app-process.R:14:3): error if cannot start ──────────────────────
> > Error: Unexpected message from webfakes app subprocess. Report a bug please.
> > Backtrace:
> > █
> > 1. ├─testthat::expect_error(...) test-app-process.R:14:2
> > 2. │ └─testthat:::expect_condition_matching(...)
> > 3. │ └─testthat:::quasi_capture(...)
> > 4. │ ├─testthat:::.capture(...)
> > 5. │ │ └─base::withCallingHandlers(...)
> > 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
> > 7. └─webfakes::new_app_process(app, start = TRUE)
> > 8. └─self$start()
> > ── Failure (test-mw-static.R:67:3): set_headers callback ───────────────────────
> > resp$status_code (`actual`) not equal to 200L (`expected`).
> > `actual`: 404
> > `expected`: 200
> > ── Failure (test-mw-static.R:68:3): set_headers callback ───────────────────────
> > resp$type (`actual`) not equal to "application/gzip" (`expected`).
> > `actual`: "text/plain"
> > `expected`: "application/gzip"
> > ── Failure (test-mw-static.R:70:3): set_headers callback ───────────────────────
> > headers$foo (`actual`) not equal to "bar" (`expected`).
> > `actual` is NULL
> > `expected` is a character vector ('bar')
> > ── Error (test-mw-static.R:71:3): set_headers callback ─────────────────────────
> > Error: cannot open the connection
> > Backtrace:
> > █
> > 1. ├─testthat::expect_equal(...) test-mw-static.R:71:2
> > 2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
> > 3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
> > 4. └─webfakes:::read_bin(test_path("fixtures", "static2", "static.tar.gz"))
> > 5. └─base::readBin(path, "raw", file.info(path)$size)
> > 6. └─base::file(con, "rb")
> > [ FAIL 5 | WARN 1 | SKIP 7 | PASS 291 ]
> > Error: Test failures
> > Execution halted
> >
> >
> > If you confirm that the failures are due to a lack of internet
> > connection it would be great if you could make these optional.
> > Alternatively it is possible to declare that this package needs internet
> > access to run the full test suite in case you consider it not sensible
> > to do those tests optional.
> >
> > Kind regards
> >
> > Andreas.
> >
> >
> > [1] https://salsa.debian.org/r-pkg-team/r-cran-webfakes/-/jobs/1821991
> >
> > --
> > http://fam-tille.de
--
http://fam-tille.de
Reply to: