Skip to content

Commit

Permalink
Merge pull request #941 from rstudio/switch-to-new-internal-domain
Browse files Browse the repository at this point in the history
switch from connect.rstudioservices.com to connect.posit.it
  • Loading branch information
mslynch authored Aug 4, 2023
2 parents 2f07fde + 3979202 commit d556871
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions tests/testthat/test-ide.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ test_that("validateServerUrl() returns expected", {

expect_false(validateServerUrl("https://posit.cloud")$valid)
expect_false(validateServerUrl("https://shinyapps.io")$valid)
expect_true(validateServerUrl("https://connect.rstudioservices.com/")$valid)
expect_true(validateServerUrl("https://connect.posit.it/")$valid)
expect_true(validateServerUrl("https://colorado.posit.co/rsc")$valid)
})

test_that("validateServerUrl() normalises urls", {
skip_on_cran()

expect_true(validateServerUrl("connect.rstudioservices.com/")$valid)
expect_true(validateServerUrl("connect.posit.it/")$valid)
expect_true(validateServerUrl("colorado.posit.co/rsc")$valid)
})

Expand All @@ -19,24 +19,24 @@ test_that("validateConnectUrl() returns expected return for some known endpoints

expect_false(validateConnectUrl("https://posit.cloud")$valid)
expect_false(validateConnectUrl("https://shinyapps.io")$valid)
expect_true(validateConnectUrl("https://connect.rstudioservices.com/")$valid)
expect_true(validateConnectUrl("https://connect.posit.it/")$valid)
expect_true(validateConnectUrl("https://colorado.posit.co/rsc")$valid)
})

test_that("validateConnectUrl() normalises urls", {
skip_on_cran()

api_url <- "https://connect.rstudioservices.com/__api__"
expect_equal(validateConnectUrl("connect.rstudioservices.com")$url, api_url)
expect_equal(validateConnectUrl("connect.rstudioservices.com")$url, api_url)
expect_equal(validateConnectUrl("https://connect.rstudioservices.com/")$url, api_url)
api_url <- "https://connect.posit.it/__api__"
expect_equal(validateConnectUrl("connect.posit.it")$url, api_url)
expect_equal(validateConnectUrl("connect.posit.it")$url, api_url)
expect_equal(validateConnectUrl("https://connect.posit.it/")$url, api_url)
})

test_that("validateConnectUrl() follows redirects", {
skip_on_cran()

api_url <- "https://connect.rstudioservices.com:443/__api__"
expect_equal(validateConnectUrl("http://connect.rstudioservices.com")$url, api_url)
api_url <- "https://connect.posit.it:443/__api__"
expect_equal(validateConnectUrl("http://connect.posit.it")$url, api_url)
})

test_that("getAppById() fails where expected", {
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-servers.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ test_that("addServer() normalises url", {
skip_on_cran()
local_temp_config()

addServer("connect.rstudioservices.com", name = "connect", quiet = TRUE)
addServer("connect.posit.it", name = "connect", quiet = TRUE)
info <- serverInfo("connect")
expect_equal(info$url, "https://connect.rstudioservices.com/__api__")
expect_equal(info$url, "https://connect.posit.it/__api__")
})

test_that("addServer() errors if url not a connect server", {
Expand Down

0 comments on commit d556871

Please sign in to comment.