swh:1:snp:bd2382f2a8d8e830b40ac8fa57268533f5e8db6c
Tip revision: 781f93f0720f7fb19ac70db9c6073c69b6cb2e2b authored by R. Kyle Bocinsky on 28 November 2022, 07:00:02 UTC
version 3.0.1
version 3.0.1
Tip revision: 781f93f
test.ITRDB.R
library(FedData)
library(httr)
library(curl)
context("International Tree Ring Data Bank tests")
# test_that("The ITRDB is available at the correct URL", {
# expect_false(suppressWarnings(httr::http_error("ftp://ftp.ncdc.noaa.gov/pub/data/paleo/treering/chronologies/")))
# expect_error(suppressWarnings(httr::http_error("ftp://ftp.ncdc.noaa.gov/pub/data/paleo/treering/blah/")))
# })
# test_that("ITRDB version files are available", {
# opts <- list(
# verbose = F,
# noprogress = T,
# fresh_connect = T,
# ftp_use_epsv = T,
# forbid_reuse = T,
# dirlistonly = T)
# hand <- curl::new_handle()
# curl::handle_setopt(hand, .list = opts)
#
# url <- 'ftp://ftp.ncdc.noaa.gov/pub/data/paleo/treering/chronologies/'
# filenames = readLines(curl::curl(url, handle = hand))
# filenames = paste(url, filenames, sep = "")
# filenames <- filenames[grep("*.zip",filenames)]
#
# expect_true(length(filenames) > 0)
# })