Skip to content

Commit

Permalink
selectively choose server
Browse files Browse the repository at this point in the history
ref #539
  • Loading branch information
wibeasley committed Oct 13, 2024
1 parent 28dc850 commit ce0c665
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/helpers-testing.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
retrieve_credential_testing <- function(project_tag = "simple", server_instance = "dev-2", username = NA_character_) {
retrieve_credential_testing <- function(project_tag = "simple", server_instance = "bbmc", username = NA_character_) {
checkmate::assert_character(project_tag , any.missing = FALSE, min.chars = 2, max.chars = 50)
checkmate::assert_character(server_instance , any.missing = FALSE, min.chars = 2, max.chars = 50)
checkmate::assert_character(username , any.missing = TRUE , min.chars = 2, max.chars = 50)
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-retrieve-credential-local.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ test_that("Good Credentials", {
expected_write_token <- "F9CBFFF78C3D78F641BAE9623F6B7E6A"
expected_write_comment <- "simple-write"

credential_read <- retrieve_credential_testing() # This project is for testing only reading from the server.
credential_longitudinal <- retrieve_credential_testing("longitudinal") # This project is for testing reading longitudinal projects.
credential_write <- retrieve_credential_testing("simple-write") # This project is for testing reading & writing.
credential_read <- retrieve_credential_testing(server_instance = "dev-2") # This project is for testing only reading from the server.
credential_longitudinal <- retrieve_credential_testing(server_instance = "dev-2","longitudinal") # This project is for testing reading longitudinal projects.
credential_write <- retrieve_credential_testing(server_instance = "dev-2","simple-write") # This project is for testing reading & writing.

expect_equal(credential_read$redcap_uri , expected_read_redcap_uri)
expect_equal(credential_read$username , expected_read_username)
Expand Down Expand Up @@ -60,8 +60,8 @@ test_that("Multiple users", {
expected_user_token <- "8092B2302CAA359C4F5641AEC1CE72ED"
expected_user_comment <- "dag-write --group A"

credential_admin <- retrieve_credential_testing(username = expected_admin_username)
credential_user <- retrieve_credential_testing(username = expected_user_username)
credential_admin <- retrieve_credential_testing(server_instance = "dev-2", username = expected_admin_username)
credential_user <- retrieve_credential_testing(server_instance = "dev-2", username = expected_user_username)

expect_equal(credential_admin$redcap_uri , expected_admin_redcap_uri)
expect_equal(credential_admin$username , expected_admin_username)
Expand Down

0 comments on commit ce0c665

Please sign in to comment.