View source: R/helper_testing.R
prepare_test_import | R Documentation |
Copies an example import to a new temp directory, sets up git for the directory and creates a test SQLite DB in the temp directory as test.sqlite.
prepare_test_import( example_dir = "example", dettl_config = "dettl_config.yml", create_db = TRUE, add_data = FALSE, add_job_table = FALSE, add_log_table = TRUE, add_fk_data = FALSE, add_cyclic_fks = FALSE )
example_dir |
The example directory to copy to temp. |
dettl_config |
Path to the dettl config file. |
create_db |
If TRUE then test SQLite db will be created |
add_data |
If TRUE data is bootstrapped to people table in test DB. |
add_job_table |
If TRUE also bootstrap job table related to people table. |
add_log_table |
If TRUE then also bootstrap log table. |
add_fk_data |
If TRUE then bootstrap three tables with foreign key |
add_cyclic_fks |
If TRUE then bootstrap two tables with cyclic foreign key constraints. constraints for testing automatic reading of foreign key constraints from db. |
This should only be called from a test, vignette or roxygen example.
dettl:::prepare_test_import( system.file("examples", "person_information", package = "dettl"), system.file("examples", "dettl_config.yml", package = "dettl") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.