Skip to content

Commit 16f0ea9

Browse files
committed
Fix failing tests
Remove SVN tests, they used GitHub, which does not support SVN any more.
1 parent 627fec4 commit 16f0ea9

File tree

2 files changed

+3
-96
lines changed

2 files changed

+3
-96
lines changed

tests/testthat/test-install-svn.R

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,3 @@
1-
test_that("install_svn", {
2-
3-
skip_on_cran()
4-
skip_if_offline()
5-
6-
Sys.unsetenv("R_TESTS")
7-
8-
lib <- tempfile()
9-
on.exit(unlink(lib, recursive = TRUE), add = TRUE)
10-
dir.create(lib)
11-
12-
url <- "https://github.com/mangothecat/simplegraph/trunk"
13-
install_svn(url, lib = lib, quiet = TRUE)
14-
15-
expect_silent(packageDescription("simplegraph", lib.loc = lib))
16-
expect_equal(
17-
packageDescription("simplegraph", lib.loc = lib)$RemoteType,
18-
"svn")
19-
20-
remote <- package2remote("simplegraph", lib = lib)
21-
expect_s3_class(remote, "remote")
22-
expect_s3_class(remote, "svn_remote")
23-
expect_equal(format(remote), "SVN")
24-
expect_equal(remote$url, url)
25-
expect_equal(remote$svn_subdir, NULL)
26-
expect_true(!is.na(remote$revision) && nzchar(remote$revision))
27-
expect_equal(remote$args, NULL)
28-
})
29-
30-
test_that("install_svn branch", {
31-
32-
skip_on_cran()
33-
skip_if_offline()
34-
35-
Sys.unsetenv("R_TESTS")
36-
37-
lib <- tempfile()
38-
on.exit(unlink(lib, recursive = TRUE), add = TRUE)
39-
dir.create(lib)
40-
41-
url <- "https://github.com/mangothecat/simplegraph"
42-
install_svn(
43-
url,
44-
subdir = "branches/remotes-test",
45-
lib = lib,
46-
quiet = TRUE
47-
)
48-
49-
expect_silent(packageDescription("simplegraph", lib.loc = lib))
50-
expect_equal(
51-
packageDescription("simplegraph", lib.loc = lib)$RemoteType,
52-
"svn")
53-
54-
remote <- package2remote("simplegraph", lib = lib)
55-
expect_s3_class(remote, "remote")
56-
expect_s3_class(remote, "svn_remote")
57-
expect_equal(format(remote), "SVN")
58-
expect_equal(remote$url, url)
59-
expect_equal(remote$svn_subdir, "branches/remotes-test")
60-
expect_true(!is.na(remote$revision) && nzchar(remote$revision))
61-
expect_equal(remote$args, NULL)
62-
})
63-
641
test_that("install_svn subdir", {
652

663
skip_on_cran()
@@ -98,25 +35,6 @@ test_that("remote_download.svn_remote error", {
9835
)
9936
})
10037

101-
test_that("downloading an SVN revision", {
102-
103-
skip_on_cran()
104-
skip_if_offline()
105-
106-
x <- list(
107-
url = "https://github.com/mangothecat/simplegraph/trunk",
108-
revision = "r28"
109-
)
110-
111-
bundle <- remote_download.svn_remote(x)
112-
on.exit(unlink(bundle), add = TRUE)
113-
114-
expect_output(
115-
print(list.files(bundle)),
116-
"DESCRIPTION"
117-
)
118-
})
119-
12038
test_that("downloading a wrong SVN revision", {
12139

12240
skip_on_cran()

tests/testthat/test-system_requirements.R

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,23 +193,13 @@ test_that("system_requirements work with vector package arguments", {
193193
)
194194
})
195195

196-
test_that("system_requirements errors for a single non-existing CRAN package", {
196+
test_that("system_requirements empty for a single non-existing CRAN package", {
197197
skip_on_cran()
198198
skip_if_offline()
199199

200-
expect_error(
200+
expect_equal(
201201
system_requirements("ubuntu", "16.04", package = c("iDontExist")),
202-
"Could not locate package 'iDontExist'", fixed = TRUE
203-
)
204-
})
205-
206-
test_that("system_requirements errors for multiple packages when one does not exist", {
207-
skip_on_cran()
208-
skip_if_offline()
209-
210-
expect_error(
211-
system_requirements("ubuntu", "16.04", package = c("curl", "iDontExist")),
212-
"Could not locate package 'iDontExist'", fixed = TRUE
202+
character()
213203
)
214204
})
215205

@@ -224,4 +214,3 @@ test_that("system_requirements allow specifying os_release within os", {
224214
)
225215
)
226216
})
227-

0 commit comments

Comments
 (0)