mirror of
https://github.com/sensebox/opensensmapr
synced 2025-02-22 23:23: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")
|
context("box")
|
||||||
|
|
||||||
check_api <- function() {
|
check_api <- function() {
|
||||||
|
skip_on_cran()
|
||||||
|
|
||||||
code <- NA
|
code <- NA
|
||||||
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
||||||
if (is.na(code)) skip("API not available")
|
if (is.na(code)) skip("API not available")
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
context("boxes")
|
context("boxes")
|
||||||
|
|
||||||
check_api <- function() {
|
check_api <- function() {
|
||||||
|
skip_on_cran()
|
||||||
|
|
||||||
code <- NA
|
code <- NA
|
||||||
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
||||||
if (is.na(code)) skip("API not available")
|
if (is.na(code)) skip("API not available")
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
context("counts")
|
context("counts")
|
||||||
|
|
||||||
check_api <- function() {
|
check_api <- function() {
|
||||||
|
skip_on_cran()
|
||||||
|
|
||||||
code <- NA
|
code <- NA
|
||||||
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
||||||
if (is.na(code)) skip("API not available")
|
if (is.na(code)) skip("API not available")
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
context("measurements")
|
context("measurements")
|
||||||
|
|
||||||
check_api <- function() {
|
check_api <- function() {
|
||||||
|
skip_on_cran()
|
||||||
|
|
||||||
code <- NA
|
code <- NA
|
||||||
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
||||||
if (is.na(code)) skip("API not available")
|
if (is.na(code)) skip("API not available")
|
||||||
|
@ -10,7 +12,6 @@ try({
|
||||||
boxes <- osem_boxes()
|
boxes <- osem_boxes()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
test_that("measurements can be retrieved for a phenomenon", {
|
test_that("measurements can be retrieved for a phenomenon", {
|
||||||
check_api()
|
check_api()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
context("phenomena")
|
context("phenomena")
|
||||||
|
|
||||||
check_api <- function() {
|
check_api <- function() {
|
||||||
|
skip_on_cran()
|
||||||
|
|
||||||
code <- NA
|
code <- NA
|
||||||
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
try(code <- httr::status_code(httr::GET(osem_endpoint())))
|
||||||
if (is.na(code)) skip("API not available")
|
if (is.na(code)) skip("API not available")
|
||||||
|
|
Loading…
Add table
Reference in a new issue