Skip to content

Commit d0070ce

Browse files
committed
Skip tests if not online
1 parent 1c2dad9 commit d0070ce

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

tests/testthat/test-build-site.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
test_that("Package pkgdown site can be built ", {
22
# This test requires internet
3+
skip_if_offline()
34
skip_on_cran()
45

56
destination <- path(tempdir(), "testPkgdown", "docs")

tests/testthat/test-reload.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
test_that("reload works", {
2-
skip_on_cran()
3-
42
withr::local_temp_libpaths()
53

64
pkg <- as.package(test_path("testTest"))

tests/testthat/test-run-source.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("gist containing single file works unambiguously", {
2+
skip_if_offline()
23
skip_on_cran()
34
withr::local_envvar(list("GITHUB_PAT" = bundled_pat))
45

@@ -13,6 +14,7 @@ test_that("gist containing single file works unambiguously", {
1314
})
1415

1516
test_that("gist with multiple files uses first with warning", {
17+
skip_if_offline()
1618
skip_on_cran()
1719
withr::local_envvar(list("GITHUB_PAT" = bundled_pat))
1820

@@ -30,6 +32,7 @@ test_that("gist with multiple files uses first with warning", {
3032
})
3133

3234
test_that("can specify filename", {
35+
skip_if_offline()
3336
skip_on_cran()
3437
withr::local_envvar(list("GITHUB_PAT" = bundled_pat))
3538

@@ -45,6 +48,7 @@ test_that("can specify filename", {
4548
})
4649

4750
test_that("error if file doesn't exist or no files", {
51+
skip_if_offline()
4852
skip_on_cran()
4953
withr::local_envvar(list("GITHUB_PAT" = bundled_pat))
5054

tests/testthat/test-sitrep.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("check_for_rstudio_updates", {
2+
skip_if_offline()
23
skip_on_cran()
34

45
# returns nothing rstudio not available

0 commit comments

Comments
 (0)