skip API dependant tests on CRAN

pull/17/head
Norwin 6 years ago
parent 6d2f6f67e1
commit 7e7b9bcb12
Signed by: norwin
GPG Key ID: 24BC059DE24C43A3

@ -1,6 +1,8 @@
context("box")
check_api <- function() {
skip_on_cran()
code <- NA
try(code <- httr::status_code(httr::GET(osem_endpoint())))
if (is.na(code)) skip("API not available")

@ -1,6 +1,8 @@
context("boxes")
check_api <- function() {
skip_on_cran()
code <- NA
try(code <- httr::status_code(httr::GET(osem_endpoint())))
if (is.na(code)) skip("API not available")

@ -1,6 +1,8 @@
context("counts")
check_api <- function() {
skip_on_cran()
code <- NA
try(code <- httr::status_code(httr::GET(osem_endpoint())))
if (is.na(code)) skip("API not available")

@ -1,6 +1,8 @@
context("measurements")
check_api <- function() {
skip_on_cran()
code <- NA
try(code <- httr::status_code(httr::GET(osem_endpoint())))
if (is.na(code)) skip("API not available")
@ -10,7 +12,6 @@ try({
boxes <- osem_boxes()
})
test_that("measurements can be retrieved for a phenomenon", {
check_api()

@ -1,6 +1,8 @@
context("phenomena")
check_api <- function() {
skip_on_cran()
code <- NA
try(code <- httr::status_code(httr::GET(osem_endpoint())))
if (is.na(code)) skip("API not available")

Loading…
Cancel
Save