prepare_test_import.Rd
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
)
The example directory to copy to temp.
Path to the dettl config file.
If TRUE then test SQLite db will be created
If TRUE data is bootstrapped to people table in test DB.
If TRUE also bootstrap job table related to people table.
If TRUE then also bootstrap log table.
If TRUE then bootstrap three tables with foreign key
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")
)
#> [1] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpiqOfW1/file14a9424f482e"