Skip to content

Commit

Permalink
skip more tests on cran
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jun 25, 2020
1 parent 57df376 commit c63fa4d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions tests/testthat/test-db_alldocs.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ test_that("db_alldocs - include_docs works", {
})

test_that("db_alldocs fails well", {
skip_on_cran()

expect_error(db_alldocs(), "argument \"cushion\" is missing")
expect_error(db_alldocs(sofa_conn), "argument \"dbname\" is missing")
})
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-db_bulk_create.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ test_that("db_bulk_create basic usage works", {
})

test_that("db_bulk_create fails well", {
skip_on_cran()

expect_error(db_bulk_create(), "argument \"cushion\" is missing")
expect_error(db_bulk_create(sofa_conn), "argument \"doc\" is missing")
expect_error(db_bulk_create(sofa_conn, "stuff"), "argument \"doc\" is missing")

skip_on_cran()
expect_error(db_bulk_create(sofa_conn, "asdfds", "adsfsdf"), "Database does not exist")
})
5 changes: 3 additions & 2 deletions tests/testthat/test-db_bulk_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ test_that("db_bulk_get", {

test_that("db_bulk_get fails well", {
expect_error(db_bulk_get(), "argument \"cushion\" is missing")

skip_on_cran()

expect_error(db_bulk_get(sofa_conn), "argument \"dbname\" is missing")
expect_error(db_bulk_get(sofa_conn, "stuff"),
"argument \"docid_rev\" is missing")

skip_on_cran()
expect_error(db_bulk_get(sofa_conn, "asdfds", "adsfsdf"),
"Database does not exist")
})
5 changes: 3 additions & 2 deletions tests/testthat/test-db_bulk_update.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ test_that("db_bulk_update basic usage works", {

test_that("db_bulk_update fails well", {
expect_error(db_bulk_update(), "argument \"cushion\" is missing")

skip_on_cran()

expect_error(db_bulk_update(sofa_conn), "argument \"doc\" is missing")
expect_error(db_bulk_update(sofa_conn, "stuff"), "argument \"doc\" is missing")

skip_on_cran()
expect_error(db_bulk_update(sofa_conn, "asdfds", mtcars), "Database does not exist")
expect_error(db_bulk_update(sofa_conn, "asdfds", 5),
"No 'db_bulk_update' method for class numeric")
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-db_query.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ test_that("db_query fails well", {
expect_error(db_query(), "argument \"cushion\" is missing")
expect_error(db_query(sofa_conn), "argument \"dbname\" is missing")

skip_on_cran()

# execution_stats should be logical
expect_error(db_query(sofa_conn, "asdf", execution_stats = 234))
# bookmark should be character
expect_error(db_query(sofa_conn, "asdf", bookmark = 234))

skip_on_cran()
expect_error(db_query(sofa_conn, "asdfds"), "Database does not exist")
})

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-doc_create.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ test_that("doc_create - json back works", {
test_that("doc_create fails well", {
expect_error(doc_create(), "argument \"cushion\" is missing")
expect_error(doc_create(sofa_conn), "argument \"doc\" is missing")
expect_error(doc_create(sofa_conn, "asdfds", "asdfadf"),
"invalid char in json text")

skip_on_cran()
expect_error(doc_create(sofa_conn, "asdfds", "asdfadf"),
"invalid char in json text")
expect_error(doc_create(sofa_conn, "asdfds", '{"a": 5}'),
"Database does not exist")
})
Expand Down

0 comments on commit c63fa4d

Please sign in to comment.