Skip to content

Commit

Permalink
ad�set ssl_cipher_list in aqs function
Browse files Browse the repository at this point in the history
  • Loading branch information
mccroweyclinton-EPA committed Jul 25, 2023
1 parent fdcfe0e commit 9a605e8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions MD5
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ bf2f1ad432ecccee3400afe533404113 *man/figures/lifecycle-superseded.svg
7ce4525010156c02adaf819a8c835134 *man/RAQSAPI.Rd
d54578e689123033bdc0f894eb441c7e *NAMESPACE
94c65e3824d4fd9ffa90ec73fed63596 *NEWS.md
b86f3338b79e42e66d5dd2a48b52e603 *R/AQSAPI_helperfunctions.R
7cb0c1a65c83e6f94eb1309fac9b0d87 *R/AQSAPI_helperfunctions.R
a3558975d0256839b174ab7868833075 *R/bybox.R
bd8b36cc7325d4fc8b8ed894f0046678 *R/bycbsa.R
253ea551f88c65c1c49feff3cb33f552 *R/bycounty.R
Expand Down Expand Up @@ -149,7 +149,7 @@ f7ea691da1baf266047ed7af4b0c4629 *tests/testthat/test-bypqao.R
41e407548ac72ec4f41e678d23a566dd *tests/testthat/test-bysite.R
051416af24d0386f084eb13a14053ce1 *tests/testthat/test-bystate.R
25648d9e388d85a6ba8449bec950ee28 *tests/testthat/test-helperfunctions.R
f4618d7a4c9e7868f40c5ab3f9d927cc *tests/testthat/test-RAQSAPlistfunctions.R
def7331bf9e0d31fdee6185008e9fc99 *tests/testthat/test-RAQSAPlistfunctions.R
8ec3157359d9a0fbdf126ed74f399ee1 *vignettes/Acknowledgements.html
49025d261826350f3050e677eab9dbac *vignettes/Acknowledgements.Rmd
22d607e5d49e10047a911e5d42183c34 *vignettes/acs-nano.csl
Expand Down
3 changes: 2 additions & 1 deletion R/AQSAPI_helperfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ aqs <- function(service, filter = NULL, user = NA,
AQSpath <- glue("https://{AQS_domain}/data/api/{service}/{filter}?") %>%
glue(format_variables_for_api(c(list(email = I(user), key = user_key),
variables))) %>%
request()
request() %>%
httr::config(ssl_cipher_list = 'DEFAULT@SECLEVEL=1')
#for some reason user_agent isn't working
#%>%
#req_user_agent(string = user_agent)
Expand Down
21 changes: 13 additions & 8 deletions tests/testthat/test-RAQSAPlistfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ test_that("list functions", {
testthat::skip_on_cran()
testthat::skip_if_offline()

# if(file.exists("./tests/testthat/local.R")) { source("./tests/testthat/local.R") }
#
# datamartAPI_user <- Sys.getenv(x = "RAQSAPIUSERNAME")
# datamartAPI_key <- Sys.getenv(x = "RAQSAPIKEY")
#
# RAQSAPI::aqs_credentials(username = datamartAPI_user,
# key = datamartAPI_key
# )
if(file.exists("local.R"))
{
source("helper.R")
AQScredentials <- RAQSAPItestsetup_helper()
datamartAPI_user <- AQScredentials$datamartAPI_user
datamartAPI_key <- AQScredentials$datamartAPI_key
} else {
datamartAPI_user <- Sys.getenv("RAQSAPIKEY", names = TRUE)
datamartAPI_key <- Sys.getenv("RAQSAPIUSERNAME", names = TRUE)
}
RAQSAPI::aqs_credentials(username = datamartAPI_user,
key = datamartAPI_key
)

aqs_isavailable(return_header = TRUE)$Header$status %>%
expect_match(regexp = "API service is up and running healthy",
Expand Down

0 comments on commit 9a605e8

Please sign in to comment.