Skip to content

Commit 2afaa7a

Browse files
committed
feat: support remote Armadillo URLs via local_settings.csv
1 parent 2cbe807 commit 2afaa7a

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

tests/testthat/connection_to_datasets/login_details.R

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,26 @@ if ((ds.test_env$driver == "DSLiteDriver") || (ds.test_env$driver == "OpalDriver
4343

4444
ds.test_env$secure_login_details <- TRUE
4545
} else if (ds.test_env$driver == "ArmadilloDriver") {
46-
ds.test_env$ping_address <- paste("http://", ds.test_env$server_ip_address, ":8080", sep="")
46+
if (ds.test_env$server_ip_address == "localhost") {
47+
armadillo.url <- "http://localhost:8080"
48+
} else {
49+
armadillo.url <- ds.test_env$server_ip_address
50+
}
51+
52+
ds.test_env$ping_address <- armadillo.url
4753
ds.test_env$ping_config <- config(timeout=5)
4854

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="")
55+
ds.test_env$ip_address_1 <- armadillo.url
56+
ds.test_env$ip_address_2 <- armadillo.url
57+
ds.test_env$ip_address_3 <- armadillo.url
5258

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")
59+
ds.test_env$user_1 <- getOption("armadillo.user", "admin")
60+
ds.test_env$user_2 <- getOption("armadillo.user", "admin")
61+
ds.test_env$user_3 <- getOption("armadillo.user", "admin")
5662

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")
63+
ds.test_env$password_1 <- getOption("armadillo.password", "admin")
64+
ds.test_env$password_2 <- getOption("armadillo.password", "admin")
65+
ds.test_env$password_3 <- getOption("armadillo.password", "admin")
6066

6167
ds.test_env$options_1 <- "list()"
6268
ds.test_env$options_2 <- "list()"

0 commit comments

Comments
 (0)