Skip to content

Commit

Permalink
test: disable keyring tests on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
aoles committed Oct 17, 2024
1 parent 0cae932 commit 3c3e4d1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/testthat/test-api_key.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ on.exit({
Sys.unsetenv("ORS_API_KEY")
api_key_val <- "key_stored_in_keyring"

skip_on_linux <- function() {
if (on_os("linux")) skip("Linux")
invisible(TRUE)
}

test_that("Set key in keyring", {
skip_on_linux()
skip_on_cran()
skip_on_os("linux")
expect_silent(ors_api_key(api_key_val))
})

test_that("Get key from keyring", {
skip_on_linux()
skip_on_cran()
skip_on_os("linux")
expect_identical(ors_api_key(), api_key_val)
})

Expand Down

0 comments on commit 3c3e4d1

Please sign in to comment.