Skip to content

Commit c4bb3b3

Browse files
Merge pull request datashield#681 from StuartWheater/v6.3.6-dev-fix/ci-test-setup
Generalized/rework ping test config
2 parents bbb5364 + d68f8f6 commit c4bb3b3

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

tests/testthat/connection_to_datasets/init_local_settings.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ init.server.url <- function()
2424

2525
init.local.settings <- function()
2626
{
27-
path <- getwd()
28-
sub.folder.name <- "/connection_to_datasets/"
29-
file.name <- "local_settings.csv"
27+
path <- getwd()
28+
sub.folder.name <- "/connection_to_datasets/"
29+
file.name <- "local_settings.csv"
3030

31-
return(paste(path, sub.folder.name, file.name, sep=""))
31+
return(paste(path, sub.folder.name, file.name, sep=""))
3232
}

tests/testthat/connection_to_datasets/login_details.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ if ((ds.test_env$driver == "DSLiteDriver") || (ds.test_env$driver == "OpalDriver
2828
opal.url <- "https://localhost:8443/"
2929
}
3030

31-
ds.test_env$ping_url <- opal.url
32-
ds.test_env$ping_config <- config(timeout=5)
31+
ds.test_env$ping_url <- opal.url
32+
ds.test_env$ping_user <- getOption("opal.user", "administrator")
33+
ds.test_env$ping_password <- getOption("opal.password", "datashield_test&")
34+
ds.test_env$ping_options <- config(timeout=5, ssl_verifyhost=0, ssl_verifypeer=0)
3335

3436
ds.test_env$server_url_1 <- opal.url
3537
ds.test_env$server_url_2 <- opal.url
@@ -55,8 +57,10 @@ if ((ds.test_env$driver == "DSLiteDriver") || (ds.test_env$driver == "OpalDriver
5557
armadillo.url <- "http://localhost:8080/"
5658
}
5759

58-
ds.test_env$ping_url <- armadillo.url
59-
ds.test_env$ping_config <- config(timeout=5)
60+
ds.test_env$ping_url <- armadillo_ping.url
61+
ds.test_env$ping_user <- getOption("armadillo.user", "admin")
62+
ds.test_env$ping_password <- getOption("armadillo.password", "admin")
63+
ds.test_env$ping_options <- "list(timeout=5)"
6064

6165
ds.test_env$server_url_1 <- armadillo.url
6266
ds.test_env$server_url_2 <- armadillo.url

tests/testthat/test-_-vm-test.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ init.testing.datasets()
2626

2727
test_that("The virtual machine is loaded. ",
2828
{
29-
response <- httr::HEAD(url=ds.test_env$ping_url, config=ds.test_env$ping_config)
29+
response <- httr::HEAD(url=ds.test_env$ping_url, config=ds.test_env$ping_options, authenticate(ds.test_env$ping_user, ds.test_env$ping_password))
3030
expect_true(http_status(response)$reason %in% c("OK", "Unauthorized"))
3131
})
3232

0 commit comments

Comments
 (0)