Skip to content

Commit

Permalink
add skip on CRAN due to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
brunj7 committed Jul 2, 2024
1 parent 02023da commit b62b573
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/testthat/test-download_d1_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ test_that("accepts correct inputs", {
})

test_that("test Arctic Data Center data URL (fully up to date data file)", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/urn:uuid:a2834e3e-f453-4c2b-8343-99477662b570",
path = temp_dir)
Expand All @@ -29,6 +32,9 @@ test_that("test Arctic Data Center data URL (fully up to date data file)", {
})

test_that("test Arctic Data Center data URL (fully up to date data file) with one data table", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- download_d1_data("https://cn.dataone.org/cn/v2/resolve/urn:uuid:a2834e3e-f453-4c2b-8343-99477662b570",
temp_dir)
Expand All @@ -47,6 +53,9 @@ test_that("test Arctic Data Center data URL (fully up to date data file) with on
})

test_that("test Arctic Data Center data URL (fully up to date data file) with multiple data tables", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/urn:uuid:a4f85031-0b91-4d92-ba0a-b02f216bba64",
path = temp_dir)
Expand All @@ -66,6 +75,9 @@ test_that("test Arctic Data Center data URL (fully up to date data file) with mu
})

test_that("Data without metadata downloads and returns summary metadata", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
expect_error(download_d1_data(data_url = "urn:uuid:7bdab6cc-8dc1-4c49-a80b-ca771c18eaa9",
path = temp_dir))
Expand All @@ -80,6 +92,9 @@ test_that("Data without metadata downloads and returns summary metadata", {

#adding a test for a dataset that uses ISO metadata and is from the Alaska Ocean Observing System member node
test_that("test data URL with ISO metadata from AOOS member node and with multiple data tables", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- expect_warning(download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/4139539e-94e7-49cc-9c7a-5f879e438b16",
path = temp_dir))
Expand All @@ -98,6 +113,9 @@ test_that("test data URL with ISO metadata from AOOS member node and with multip

#adding a test for a dataset that uses ISO metadata from Research Workspace member node
test_that("test data URL with ISO metadata from Research Workspace member node and with multiple data tables", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/f8e4b479-2c85-4cfd-ad69-4aa059b58a92",
path = temp_dir)
Expand All @@ -116,6 +134,9 @@ test_that("test data URL with ISO metadata from Research Workspace member node a

# EDI data test
test_that("test EDI data URL (fully up to date data file) with multiple data tables", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/https%3A%2F%2Fpasta.lternet.edu%2Fpackage%2Fdata%2Feml%2Fedi%2F746%2F1%2F2eac05447c1141bc8942284dfb32643c",
path = temp_dir)
Expand All @@ -136,6 +157,9 @@ test_that("test EDI data URL (fully up to date data file) with multiple data tab

# Another EDI test
test_that("test EDI data URL (fully up to date data file, eml v2.2.0) with one data table", {
# Takes too much time and add load on servers
skip_on_cran()

temp_dir <- tempdir()
out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/https%3A%2F%2Fpasta.lternet.edu%2Fpackage%2Fdata%2Feml%2Fedi%2F858%2F1%2F15ad768241d2eeed9f0ba159c2ab8fd5",
path = temp_dir)
Expand Down

0 comments on commit b62b573

Please sign in to comment.