Running 'testthat.R' [4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(dhis2r)
  Initiating curl with CURL_SSL_BACKEND: openssl
  > 
  > test_check("dhis2r")
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 1 ]
  
  == Failed tests ================================================================
  -- Error ('test-connect.R:9:3'): Can connect to DHIS2 instance -----------------
  <httr2_http_401/httr2_http/rlang_error/error/condition>
  Error in `resp_abort(resp, error_body(req, resp))`: HTTP 401 Unauthorized.
  Backtrace:
      x
   1. +-testthat::expect_equal(...) at test-connect.R:9:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. +-httr2::resp_status(req_perform(dhis2_play_connection$request_sent))
   5. | \-httr2:::check_response(resp)
   6. |   \-httr2:::is_response(req)
   7. \-httr2::req_perform(dhis2_play_connection$request_sent)
   8.   \-httr2:::resp_abort(resp, error_body(req, resp))
   9.     \-rlang::abort(...)
  -- Error ('test-connect.R:16:3'): user information is a charater vector --------
  <httr2_http_401/httr2_http/rlang_error/error/condition>
  Error in `resp_abort(resp, error_body(req, resp))`: HTTP 401 Unauthorized.
  Backtrace:
      x
   1. +-testthat::expect_equal(...) at test-connect.R:16:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-dhis2_play_connection$get_user_info()
   5.   \-httr2::req_perform(req_url_path_append(self$request_sent, "me"))
   6.     \-httr2:::resp_abort(resp, error_body(req, resp))
   7.       \-rlang::abort(...)
  -- Error ('test-connect.R:21:3'): Resource(s) "displayName","singular","plural","href" are return --
  <httr2_http_401/httr2_http/rlang_error/error/condition>
  Error in `resp_abort(resp, error_body(req, resp))`: HTTP 401 Unauthorized.
  Backtrace:
      x
   1. +-testthat::expect_equal(...) at test-connect.R:21:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-dhis2_play_connection$get_metadata()
   5.   \-httr2::req_perform(req_url_path_append(self$request_sent, "resources"))
   6.     \-httr2:::resp_abort(resp, error_body(req, resp))
   7.       \-rlang::abort(...)
  -- Error ('test-connect.R:26:3'): Type of result of a specific resouce is list --
  <httr2_http_401/httr2_http/rlang_error/error/condition>
  Error in `resp_abort(resp, error_body(req, resp))`: HTTP 401 Unauthorized.
  Backtrace:
      x
   1. +-testthat::expect_type(...) at test-connect.R:26:2
   2. | \-testthat::quasi_label(enquo(object), arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-dhis2_play_connection$get_metadata(endpoint = "dataElements")
   5.   \-httr2::req_perform(...)
   6.     \-httr2:::resp_abort(resp, error_body(req, resp))
   7.       \-rlang::abort(...)
  -- Error ('test-connect.R:32:3'): Type of result of possible fields is a character vector --
  <httr2_http_401/httr2_http/rlang_error/error/condition>
  Error in `resp_abort(resp, error_body(req, resp))`: HTTP 401 Unauthorized.
  Backtrace:
      x
   1. +-testthat::expect_type(...) at test-connect.R:32:2
   2. | \-testthat::quasi_label(enquo(object), arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-dhis2_play_connection$get_metadata_fields(endpoint = "dataElements")
   5.   \-httr2::req_perform(...)
   6.     \-httr2:::resp_abort(resp, error_body(req, resp))
   7.       \-rlang::abort(...)
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 1 ]
  Error: Test failures
  Execution halted