Skip to content

Commit 9f9f0de

Browse files
committed
try ping again
1 parent bf4ebd6 commit 9f9f0de

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
structure(list(method = "GET", url = "https://conbench.ursa.dev:443/api/users/",
1+
structure(list(method = "GET", url = "https://conbench.ursa.dev:443/api/ping/",
22
status_code = 401L, headers = structure(list(date = "Fri, 18 Feb 2022 23:11:54 GMT",
33
`content-type` = "application/json", `content-length` = "37",
44
server = "gunicorn"), class = "httr2_headers"), body = charToRaw("{\"code\": 401, \"name\": \"Unauthorized\"}")), class = "httr2_response")

tests/testthat/test-session.R

+11-11
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ test_that("get_config errors when it has no environment variables",{
3131
)
3232
})
3333

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

4646
with_mock_dir(test_path("logged-in"), {
4747
test_that("Can log in", {

0 commit comments

Comments
 (0)