Skip to content

Commit

Permalink
try ping again
Browse files Browse the repository at this point in the history
  • Loading branch information
boshek committed Dec 12, 2023
1 parent bf4ebd6 commit 9f9f0de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
structure(list(method = "GET", url = "https://conbench.ursa.dev:443/api/users/",
structure(list(method = "GET", url = "https://conbench.ursa.dev:443/api/ping/",
status_code = 401L, headers = structure(list(date = "Fri, 18 Feb 2022 23:11:54 GMT",
`content-type` = "application/json", `content-length` = "37",
server = "gunicorn"), class = "httr2_headers"), body = charToRaw("{\"code\": 401, \"name\": \"Unauthorized\"}")), class = "httr2_response")
22 changes: 11 additions & 11 deletions tests/testthat/test-session.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ test_that("get_config errors when it has no environment variables",{
)
})

# with_mock_dir(test_path("not-logged-in"), {
# test_that("Can log in", {
# expect_null(.conbench_session$cookie)
# resp <- request("http://localhost/api") |>
# req_url_path_append("users") |>
# conbench_perform()
# # This is still a 401 becuase httptest2 only has one possible response for users
# expect_identical(resp_status(resp), 401L)
# expect_identical(.conbench_session$cookie, "REDACTED")
# })
# })
with_mock_dir(test_path("not-logged-in"), {
test_that("Can log in", {
expect_null(.conbench_session$cookie)
resp <- request("http://localhost/api") |>
req_url_path_append("ping") |>
conbench_perform()
# This is still a 401 becuase httptest2 only has one possible response for users
expect_identical(resp_status(resp), 401L)
expect_identical(.conbench_session$cookie, "REDACTED")
})
})

with_mock_dir(test_path("logged-in"), {
test_that("Can log in", {
Expand Down

0 comments on commit 9f9f0de

Please sign in to comment.