Skip to content

Commit

Permalink
a few more
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Aug 27, 2020
1 parent b921510 commit 4b21eee
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# contentid 0.0.5

* bugfix on CRAN test
* Avoid erroneously failures on CRAN during to network connectivity issues on CRAN machines

# contentid 0.0.4 2020-08-12

Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-pin.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ context("pin")

test_that("We can access a URL with an unverified pin", {

skip_if_offline()
skip_on_cran()

path <- pin(url, verify = FALSE)

Expand All @@ -26,6 +28,8 @@ test_that("We can access a URL with an unverified pin", {

test_that("We can access a URL with pin", {

skip_if_offline()
skip_on_cran()

path <- pin(url)

Expand Down
29 changes: 20 additions & 9 deletions tests/testthat/test-software-heritage.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@

context("software heritage")


test_that("we can return sources from software heritage", {

skip_if_offline()
skip_on_cran()

id <- paste0("hash://sha256/9412325831dab22aeebdd",
"674b6eb53ba6b7bdd04bb99a4dbb21ddff646287e37")
df <- sources_swh(id)
expect_is(df, "data.frame")

})

test_that("we can use software heritage API fns", {

skip_if_offline()
skip_on_cran()

x <- store_swh( "https://github.com/CSSEGISandData/COVID-19")
expect_is(x, "list")

x<- history_swh("https://github.com/CSSEGISandData/COVID-19")
expect_is(x, "list")


store_swh( "https://github.com/CSSEGISandData/COVID-19")

history_swh("https://github.com/CSSEGISandData/COVID-19")


id <- paste0("hash://sha256/9412325831dab22aeebdd",
"674b6eb53ba6b7bdd04bb99a4dbb21ddff646287e37")
retrieve_swh(id)

id <- paste0("hash://sha256/9412325831dab22aeebdd",
"674b6eb53ba6b7bdd04bb99a4dbb21ddff646287e37")
x <- retrieve_swh(id)
expect_is(x, "character")

})

0 comments on commit 4b21eee

Please sign in to comment.