tests/testthat/test-public-service.R

context("Public service tests")

test_that("intentional bad keys", {
  suppressWarnings(bad <- bucketlist(key = 'BAD KEY', secret = 'BAD SECRET'))
  expect_is(bad, "aws_error")
  expect_equal(bad$Code, "InvalidAccessKeyId")
  expect_warning(bucketlist(key = 'BAD KEY', secret = 'BAD SECRET'), regexp = "Forbidden (HTTP 403)", fixed = TRUE)
})
zhangxing-love/QingStorRSDK_0.1 documentation built on May 4, 2019, 10:17 p.m.