tests/testthat/test-aauth.R

test_that("Authentication", {
  skip_if_no_token()
  
  # manual auth
  expect_true(googleAuthR::gar_has_token())
})

test_that("Expected env vars present",{
  skip_if_no_token()
  expect_true(nzchar(Sys.getenv("GCS_DEFAULT_BUCKET")))
  expect_true(nzchar(Sys.getenv("GCS_DEFAULT_PROJECT")))
  expect_true(nzchar(Sys.getenv("GCS_AUTH_FILE")))
  
})

Try the googleCloudStorageR package in your browser

Any scripts or data that you put into this service are public.

googleCloudStorageR documentation built on Dec. 16, 2021, 5:06 p.m.