Running ‘testthat.R’ [2s/222s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(pageviews)
  > 
  > test_check("pageviews")
  [ FAIL 11 | WARN 0 | SKIP 0 | PASS 3 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test.R:4:3'): basic project pageview queries work ───────────────────
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::project_pageviews() at test.R:4:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:18:3'): Basic top-article queries work ───────────────────────
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::top_articles() at test.R:18:2
   2.   └─pageviews:::pv_query(parameters, reformat, ...)
   3.     └─base::lapply(...)
   4.       └─pageviews (local) FUN(X[[i]], ...)
   5.         └─httr::stop_for_status(result)
  ── Error ('test.R:32:3'): Basic per-article queries work ───────────────────────
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::article_pageviews() at test.R:32:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:52:3'): Basic per-article queries work (with date objects) ───
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::article_pageviews(start = Sys.Date() - 10, end = Sys.Date()) at test.R:52:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:73:3'): Timestamps functions work with API ───────────────────
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::article_pageviews(...) at test.R:73:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:84:3'): User type and platform can be used (pageviews). ──────
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::article_pageviews(...) at test.R:84:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:94:3'): Platform can be used (top_articles) ──────────────────
  <http_502/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Bad Gateway (HTTP 502).
  Backtrace:
      ▆
   1. └─pageviews::top_articles(...) at test.R:94:2
   2.   └─pageviews:::pv_query(parameters, reformat, ...)
   3.     └─base::lapply(...)
   4.       └─pageviews (local) FUN(X[[i]], ...)
   5.         └─httr::stop_for_status(result)
  ── Error ('test.R:102:3'): Hourly granularity works for `project_pageviews` ────
  <http_503/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Service Unavailable (HTTP 503).
  Backtrace:
      ▆
   1. └─pageviews::project_pageviews(granularity = "hourly", end = "2015100123") at test.R:102:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:110:3'): Basic old-method queries work ───────────────────────
  <http_503/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Service Unavailable (HTTP 503).
  Backtrace:
      ▆
   1. └─pageviews::old_pageviews() at test.R:110:2
   2.   └─pageviews:::pv_query(parameters, reformat, old = TRUE, ...)
   3.     └─base::lapply(...)
   4.       └─pageviews (local) FUN(X[[i]], ...)
   5.         └─httr::stop_for_status(result)
  ── Error ('test.R:125:3'): Monthly granularity works for `article_pageviews` ───
  <http_503/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Service Unavailable (HTTP 503).
  Backtrace:
      ▆
   1. └─pageviews::project_pageviews(granularity = "monthly", end = "2016100100") at test.R:125:2
   2.   └─pageviews:::pageviews(...)
   3.     └─pageviews:::pv_query(parameters, reformat, ...)
   4.       └─base::lapply(...)
   5.         └─pageviews (local) FUN(X[[i]], ...)
   6.           └─httr::stop_for_status(result)
  ── Error ('test.R:132:3'): Monthly granularity works for `top_articles` ────────
  <http_503/http_500/http_error/error/condition>
  Error in `FUN(X[[i]], ...)`: Service Unavailable (HTTP 503).
  Backtrace:
      ▆
   1. └─pageviews::top_articles(granularity = "monthly") at test.R:132:2
   2.   └─pageviews:::pv_query(parameters, reformat, ...)
   3.     └─base::lapply(...)
   4.       └─pageviews (local) FUN(X[[i]], ...)
   5.         └─httr::stop_for_status(result)
  
  [ FAIL 11 | WARN 0 | SKIP 0 | PASS 3 ]
  Error: Test failures
  Execution halted