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:
parent
6d2f6f67e1
commit
7e7b9bcb12
5 changed files with 29 additions and 20 deletions
|
@ -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…
Add table
Reference in a new issue