1
0
Fork 0
mirror of https://github.com/sensebox/opensensmapr synced 2025-02-22 14:53:57 +01:00

skip API dependant tests on CRAN

This commit is contained in:
Norwin 2018-01-15 15:25:18 +01:00
parent 6d2f6f67e1
commit 7e7b9bcb12
Signed by: norwin
GPG key ID: 24BC059DE24C43A3
5 changed files with 29 additions and 20 deletions

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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()

View file

@ -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")