diff --git a/DESCRIPTION b/DESCRIPTION index 0c8f137..03c7644 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: openrouteservice Title: An 'openrouteservice' API Client -Version: 0.6.0 +Version: 0.6.1 Authors@R: c( person("Heidelberg Institute for Geoinformation Technology (HeiGIT) gGmbH", role = "cph"), person(c("Andrzej", "K."), "OleÅ›", email = "andrzej.oles@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0285-2787")) diff --git a/tests/testthat/test-api_key.R b/tests/testthat/test-api_key.R index 9e0a754..ce8fa91 100644 --- a/tests/testthat/test-api_key.R +++ b/tests/testthat/test-api_key.R @@ -1,8 +1,12 @@ context("Key management") +on_cran <- function() { + !interactive() && !isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false"))) +} + ## record current state before starting any tests env <- Sys.getenv("ORS_API_KEY", NA); -key <- tryCatch(keyring::key_get("openrouteservice"), error = function(e) NA) +key <- tryCatch(if (on_cran()) NA else keyring::key_get("openrouteservice"), error = function(e) NA) ## restore initial state on.exit({