Running ‘testthat.R’ [15s/52s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rsconnect)
  > 
  > run_tests <- function() {
  +   # set temp config dir so the tests don't pollute it
  +   temp_config_dir <- file.path(tempdir(), "rsconnect-test-config")
  +   Sys.setenv(R_USER_CONFIG_DIR = temp_config_dir)
  + 
  +   # clean up temp dir after tests are run
  +   on.exit({
  +     unlink(temp_config_dir, recursive = TRUE)
  +   }, add = TRUE)
  + 
  +   # perform tests
  +   test_check("rsconnect")
  + }
  > 
  > run_tests()
  curl: (7) Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server
  curl: (7) Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server
  [ FAIL 8 | WARN 2 | SKIP 44 | PASS 291 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (44)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-http.R:102:3'): simple http GET works (libcurl) ────────────────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server
  Backtrace:
       ▆
    1. └─rsconnect (local) test_http_GET("libcurl") at test-http.R:102:2
    2.   └─rsconnect:::GET(...) at test-http.R:90:2
    3.     └─rsconnect:::httpRequest(...)
    4.       └─rsconnect:::httpInvokeRequest(..., http = httpFunction())
    5.         └─rsconnect (local) http(...)
    6.           ├─base::system.time(...)
    7.           └─base::tryCatch(...)
    8.             └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.               └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.                 └─value[[3L]](cond)
  ── Error ('test-http.R:106:3'): simple http GET works (internal) ───────────────
  Error in `socketConnection(host = host, port = as.integer(port), open = "w+b", 
      blocking = TRUE, timeout = timeout)`: cannot open the connection
  Backtrace:
      ▆
   1. └─rsconnect (local) test_http_GET("internal") at test-http.R:106:2
   2.   └─rsconnect:::GET(...) at test-http.R:90:2
   3.     └─rsconnect:::httpRequest(...)
   4.       └─rsconnect:::httpInvokeRequest(..., http = httpFunction())
   5.         └─rsconnect (local) http(...)
   6.           ├─base::system.time(...)
   7.           └─base::socketConnection(...)
  ── Error ('test-http.R:111:3'): simple http GET works (RCurl) ──────────────────
  <COULDNT_CONNECT/GenericCurlError/error/condition>
  Error in `function (type, msg, asError = TRUE) 
  {
      if (!is.character(type)) {
          i = match(type, CURLcodeValues)
          typeName = if (is.na(i)) 
              character()
          else names(CURLcodeValues)[i]
      }
      typeName = gsub("^CURLE_", "", typeName)
      fun = (if (asError) 
          stop
      else warning)
      fun(structure(list(message = msg, call = sys.call()), class = c(typeName, 
          "GenericCurlError", "error", "condition")))
  }(7L, "Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server", 
      TRUE)`: Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server
  Backtrace:
       ▆
    1. └─rsconnect (local) test_http_GET("rcurl") at test-http.R:111:2
    2.   └─rsconnect:::GET(...) at test-http.R:90:2
    3.     └─rsconnect:::httpRequest(...)
    4.       └─rsconnect:::httpInvokeRequest(..., http = httpFunction())
    5.         └─rsconnect (local) http(...)
    6.           ├─base::system.time(...)
    7.           └─base::tryCatch(...)
    8.             └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.               └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.                 └─value[[3L]](cond)
  ── Error ('test-http.R:116:3'): simple http GET works (curl) ───────────────────
  Error in `http(service$protocol, service$host, service$port, method, url, 
      headers, timeout = timeout, certificate = certificate)`: Curl request failed (curl error 7 occurred)
  Backtrace:
      ▆
   1. └─rsconnect (local) test_http_GET("curl") at test-http.R:116:2
   2.   └─rsconnect:::GET(...) at test-http.R:90:2
   3.     └─rsconnect:::httpRequest(...)
   4.       └─rsconnect:::httpInvokeRequest(..., http = httpFunction())
   5.         └─rsconnect (local) http(...)
  ── Error ('test-http.R:151:3'): posting JSON works (libcurl) ───────────────────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server
  Backtrace:
       ▆
    1. └─rsconnect (local) test_http_POST_JSON("libcurl") at test-http.R:151:2
    2.   └─rsconnect:::POST_JSON(...) at test-http.R:134:2
    3.     └─rsconnect:::POST(...)
    4.       └─rsconnect:::httpRequestWithBody(...)
    5.         └─rsconnect (local) http(...)
    6.           ├─base::system.time(...)
    7.           └─base::tryCatch(...)
    8.             └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.               └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.                 └─value[[3L]](cond)
  ── Error ('test-http.R:155:3'): posting JSON works (internal) ──────────────────
  Error in `socketConnection(host = host, port = as.integer(port), open = "w+b", 
      blocking = TRUE, timeout = timeout)`: cannot open the connection
  Backtrace:
      ▆
   1. └─rsconnect (local) test_http_POST_JSON("internal") at test-http.R:155:2
   2.   └─rsconnect:::POST_JSON(...) at test-http.R:134:2
   3.     └─rsconnect:::POST(...)
   4.       └─rsconnect:::httpRequestWithBody(...)
   5.         └─rsconnect (local) http(...)
   6.           ├─base::system.time(...)
   7.           └─base::socketConnection(...)
  ── Error ('test-http.R:160:3'): posting JSON works (RCurl) ─────────────────────
  <COULDNT_CONNECT/GenericCurlError/error/condition>
  Error in `function (type, msg, asError = TRUE) 
  {
      if (!is.character(type)) {
          i = match(type, CURLcodeValues)
          typeName = if (is.na(i)) 
              character()
          else names(CURLcodeValues)[i]
      }
      typeName = gsub("^CURLE_", "", typeName)
      fun = (if (asError) 
          stop
      else warning)
      fun(structure(list(message = msg, call = sys.call()), class = c(typeName, 
          "GenericCurlError", "error", "condition")))
  }(7L, "Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server", 
      TRUE)`: Failed to connect to localhost port 4072 after 0 ms: Couldn't connect to server
  Backtrace:
       ▆
    1. └─rsconnect (local) test_http_POST_JSON("rcurl") at test-http.R:160:2
    2.   └─rsconnect:::POST_JSON(...) at test-http.R:134:2
    3.     └─rsconnect:::POST(...)
    4.       └─rsconnect:::httpRequestWithBody(...)
    5.         └─rsconnect (local) http(...)
    6.           ├─base::system.time(...)
    7.           └─base::tryCatch(...)
    8.             └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.               └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.                 └─value[[3L]](cond)
  ── Error ('test-http.R:165:3'): posting JSON works (libcurl) ───────────────────
  Error in `http(service$protocol, service$host, service$port, method, url, 
      headers, contentType, file, certificate = certificate)`: Curl request failed (curl error 7 occurred)
  Backtrace:
      ▆
   1. └─rsconnect (local) test_http_POST_JSON("curl") at test-http.R:165:2
   2.   └─rsconnect:::POST_JSON(...) at test-http.R:134:2
   3.     └─rsconnect:::POST(...)
   4.       └─rsconnect:::httpRequestWithBody(...)
   5.         └─rsconnect (local) http(...)
  
  [ FAIL 8 | WARN 2 | SKIP 44 | PASS 291 ]
  Error: Test failures
  Execution halted