Running ‘testthat.R’ [4s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(lambdr)
  > 
  > test_check("lambdr")
  [ FAIL 29 | WARN 0 | SKIP 0 | PASS 95 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-handle-event.R:2:3'): Mock square root function ────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_response(...) at test-handle-event.R:2:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:57:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-handle-event.R:11:3'): Mock custom function ────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_response(...) at test-handle-event.R:11:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:57:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-handle-event.R:28:3'): Custom deserialisers are used in event handling ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_response(...) at test-handle-event.R:28:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:57:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-handle-event.R:45:3'): Custom serialisers are used in event handling ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_response(...) at test-handle-event.R:45:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:57:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-handle-event.R:54:3'): Mock function with no inputs ────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_response(...) at test-handle-event.R:54:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:57:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-handle-event.R:72:3'): handlers that accept a context argument receive it ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_response(...) at test-handle-event.R:72:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:57:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-handle-event.R:84:3'): errors are sent to invocation error endpoint ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_invocation_error(...) at test-handle-event.R:84:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:99:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-html-api-gateway-events.R:3:3'): we can parse input with parameter arguments from a HTML API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_html_api_gateway_event(...) at test-html-api-gateway-events.R:3:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-html-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-html-api-gateway-events.R:20:3'): we can parse input with body arguments from a HTML API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_html_api_gateway_event(...) at test-html-api-gateway-events.R:20:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-html-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-html-api-gateway-events.R:39:3'): we can parse input with body and parameter arguments from a HTML
            API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_html_api_gateway_event(...) at test-html-api-gateway-events.R:39:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-html-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-html-api-gateway-events.R:57:3'): we can parse input with no arguments from a HTML API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_html_api_gateway_event(...) at test-html-api-gateway-events.R:57:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-html-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-html-api-gateway-events.R:77:3'): HTML API Gateway event errors are handled as responses ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_html_api_gateway_event(...) at test-html-api-gateway-events.R:77:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-html-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-html-api-gateway-events.R:106:3'): HTML API Gateway event errors can include status codes ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_html_api_gateway_event(...) at test-html-api-gateway-events.R:106:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-html-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-lambda-config.R:94:3'): initialisation error recorded when handler undefined ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::trigger_initialisation_error(...) at test-lambda-config.R:94:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:142:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-lambda-config.R:120:3'): undefined handlers are caught ─────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::trigger_initialisation_error(...) at test-lambda-config.R:120:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:142:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-lambda-config.R:129:3'): non-function handlers provided by env var are caught ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::trigger_initialisation_error(...) at test-lambda-config.R:129:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:142:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-lambda-config.R:138:3'): non-function handlers provided directly are caught ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::trigger_initialisation_error(...) at test-lambda-config.R:138:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:142:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-lambda-config.R:173:3'): non function custom deserialisers are caught ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::trigger_initialisation_error(...) at test-lambda-config.R:173:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:142:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-lambda-config.R:181:3'): non function custom serialisers are caught ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::trigger_initialisation_error(...) at test-lambda-config.R:181:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-test-helpers.R:142:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-rest-api-gateway-events.R:3:3'): we can parse input with parameter arguments from a REST API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_rest_api_gateway_event(...) at test-rest-api-gateway-events.R:3:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-rest-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-rest-api-gateway-events.R:20:3'): we can parse input with body arguments from a REST API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_rest_api_gateway_event(...) at test-rest-api-gateway-events.R:20:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-rest-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-rest-api-gateway-events.R:39:3'): we can parse input with body and parameter arguments from a REST
            API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_rest_api_gateway_event(...) at test-rest-api-gateway-events.R:39:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-rest-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-rest-api-gateway-events.R:57:3'): we can parse input with no arguments from a REST API Gateway ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_rest_api_gateway_event(...) at test-rest-api-gateway-events.R:57:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-rest-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-rest-api-gateway-events.R:77:3'): REST API Gateway event errors are handled as responses ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_rest_api_gateway_event(...) at test-rest-api-gateway-events.R:77:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-rest-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-rest-api-gateway-events.R:106:3'): REST API Gateway event errors can include status codes ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. ├─lambdr:::mock_rest_api_gateway_event(...) at test-rest-api-gateway-events.R:106:3
   2. └─base::loadNamespace(x) at tests/testthat/helper-rest-api-gateway-test-helpers.R:15:3
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-start-lambda.R:6:3'): start_lambda starts lambda runtime ───────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test-start-lambda.R:6:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-start-listening.R:3:3'): status code check works ───────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test-start-listening.R:3:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-start-listening.R:44:3'): event headers extracted, prettified and distilled ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test-start-listening.R:44:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-start-listening.R:96:3'): error occurs when request ID not in headers ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'webmockr'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test-start-listening.R:96:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  
  [ FAIL 29 | WARN 0 | SKIP 0 | PASS 95 ]
  Error: Test failures
  Execution halted