Skip to content

Commit ed7f5a5

Browse files
Merge branch 'datashield:feat/armadillo-remote-url' into feat/armadillo-remote-url
2 parents 20c7c65 + 5b13e34 commit ed7f5a5

1 file changed

Lines changed: 26 additions & 14 deletions

File tree

tests/testthat/connection_to_datasets/login_details.R

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ if (! is.null(getOption("default_driver"))) {
2222
}
2323

2424
if ((ds.test_env$driver == "DSLiteDriver") || (ds.test_env$driver == "OpalDriver")) {
25-
ds.test_env$ping_address <- paste("https://", ds.test_env$server_ip_address, ":8443", sep="")
25+
if (ds.test_env$server_ip_address == "localhost") {
26+
opal.url <- "https://localhost:8443"
27+
} else {
28+
opal.url <- ds.test_env$server_ip_address
29+
}
30+
31+
ds.test_env$ping_address <- opal.url
2632
ds.test_env$ping_config <- config(timeout=5, ssl_verifyhost=0, ssl_verifypeer=0)
2733

28-
ds.test_env$ip_address_1 <- paste("https://", ds.test_env$server_ip_address, ":8443", sep="")
29-
ds.test_env$ip_address_2 <- paste("https://", ds.test_env$server_ip_address, ":8443", sep="")
30-
ds.test_env$ip_address_3 <- paste("https://", ds.test_env$server_ip_address, ":8443", sep="")
34+
ds.test_env$ip_address_1 <- opal.url
35+
ds.test_env$ip_address_2 <- opal.url
36+
ds.test_env$ip_address_3 <- opal.url
3137

3238
ds.test_env$user_1 <- getOption("opal.user", "administrator")
3339
ds.test_env$user_2 <- getOption("opal.user", "administrator")
@@ -43,20 +49,26 @@ if ((ds.test_env$driver == "DSLiteDriver") || (ds.test_env$driver == "OpalDriver
4349

4450
ds.test_env$secure_login_details <- TRUE
4551
} else if (ds.test_env$driver == "ArmadilloDriver") {
46-
ds.test_env$ping_address <- paste("http://", ds.test_env$server_ip_address, ":8080", sep="")
52+
if (ds.test_env$server_ip_address == "localhost") {
53+
armadillo.url <- "http://localhost:8080"
54+
} else {
55+
armadillo.url <- ds.test_env$server_ip_address
56+
}
57+
58+
ds.test_env$ping_address <- armadillo.url
4759
ds.test_env$ping_config <- config(timeout=5)
4860

49-
ds.test_env$ip_address_1 <- paste("http://", ds.test_env$server_ip_address, ":8080", sep="")
50-
ds.test_env$ip_address_2 <- paste("http://", ds.test_env$server_ip_address, ":8080", sep="")
51-
ds.test_env$ip_address_3 <- paste("http://", ds.test_env$server_ip_address, ":8080", sep="")
61+
ds.test_env$ip_address_1 <- armadillo.url
62+
ds.test_env$ip_address_2 <- armadillo.url
63+
ds.test_env$ip_address_3 <- armadillo.url
5264

53-
ds.test_env$user_1 <- getOption("opal.user", "admin")
54-
ds.test_env$user_2 <- getOption("opal.user", "admin")
55-
ds.test_env$user_3 <- getOption("opal.user", "admin")
65+
ds.test_env$user_1 <- getOption("armadillo.user", "admin")
66+
ds.test_env$user_2 <- getOption("armadillo.user", "admin")
67+
ds.test_env$user_3 <- getOption("armadillo.user", "admin")
5668

57-
ds.test_env$password_1 <- getOption("opal.password", "admin")
58-
ds.test_env$password_2 <- getOption("opal.password", "admin")
59-
ds.test_env$password_3 <- getOption("opal.password", "admin")
69+
ds.test_env$password_1 <- getOption("armadillo.password", "admin")
70+
ds.test_env$password_2 <- getOption("armadillo.password", "admin")
71+
ds.test_env$password_3 <- getOption("armadillo.password", "admin")
6072

6173
ds.test_env$options_1 <- "list()"
6274
ds.test_env$options_2 <- "list()"

0 commit comments

Comments
 (0)