test_single_database: Test Single Database

Description Usage Arguments Value See Also Examples

Description

Run a single datasource through the testing suite. Typically, this object would be a connection or a 'tbl_sql'

Usage

1
test_single_database(datasource, tests = pkg_test(), label = NULL)

Arguments

datasource

The datasource to test against. Either a DBI connection or a tbl_sql

tests

optional A character vector of yaml tests to execute. References 'dbtest' test suite by default

label

optional The label to give the test. If not provided, one will be generated

Value

A list object with the label and testthat results

See Also

test_database

Examples

1
2
3
4
5
6
## Not run: 
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
res <- test_single_database(con, pkg_test("simple-tests.yml"))
DBI::dbDisconnect(con)

## End(Not run)

rstudio/dbtest documentation built on May 6, 2019, 10:47 a.m.