Running ‘testthat.R’ [18s/34s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # Copyright (c) 2015-present, Facebook, Inc.
  > # All rights reserved.
  > #
  > # This source code is licensed under the BSD-style license found in the
  > # LICENSE file in the root directory of this source tree. An additional grant
  > # of patent rights can be found in the PATENTS file in the same directory.
  > 
  > library("testthat")
  > library("DBI")
  > library("RPresto")
  > 
  > test_check("RPresto")
  ── 1. Error: db_explain works with mock (@test-db_explain.R#26)  ───────────────
  `con` must not be NULL
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "EXPLAIN SHOW TABLES", next_uri = "http://localhost:8000/query_1/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(e = "explanation", stringsAsFactors = FALSE), 
             state = "FINISHED")), {
             result <- dplyr::db_explain(s[["con"]], dplyr::sql("SHOW TABLES"))
             expect_equal(result, "explanation")
         }) at testthat/test-db_explain.R:26
  2: eval(code[[length(code)]], parent.frame())
  3: eval(code[[length(code)]], parent.frame())
  4: dplyr::db_explain(s[["con"]], dplyr::sql("SHOW TABLES"))
  5: db_explain.PrestoConnection(s[["con"]], dplyr::sql("SHOW TABLES"))
  6: build_sql("EXPLAIN ", sql)
  7: stop("`con` must not be NULL", call. = FALSE)
  
  -- 2. Failure: as() works (@test-translate_sql.R#26)  --------------------------
  translate_sql(pmax(x), con = s[["con"]]) not equal to dplyr::sql("GREATEST(\"x\")").
  1/1 mismatches
  x[1]: "greatest(\"x\")"
  y[1]: "GREATEST(\"x\")"
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 278 SKIPPED: 28 WARNINGS: 1 FAILED: 2
  1. Error: db_explain works with mock (@test-db_explain.R#26) 
  2. Failure: as() works (@test-translate_sql.R#26) 
  
  Error: testthat unit tests failed
  Execution halted