* using log directory ‘/data/gannet/ripley/R/packages/tests-Suggests/sqlhelper.Rcheck’ * using R Under development (unstable) (2026-03-15 r89629) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7) GNU Fortran (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7) * running under: Fedora Linux 42 (Workstation Edition) * using session charset: UTF-8 * current time: 2026-03-15 15:41:57 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘sqlhelper/DESCRIPTION’ ... OK * this is package ‘sqlhelper’ version ‘0.2.1’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘sqlhelper’ can be installed ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking R/sysdata.rda ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... ERROR Running examples in ‘sqlhelper-Ex.R’ failed The error most likely occurred in: > ### Name: is_connected > ### Title: Test whether a database is connected > ### Aliases: is_connected not_connected > > ### ** Examples > > library(sqlhelper) > > connect( + system.file("examples/sqlhelper_db_conf.yml", + package="sqlhelper") + ) Error whilst connecting simple_sqlite: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'simple_sqlite' Warning in value[[3L]](cond) : simple_sqlite is not available Error whilst connecting pool_sqlite: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_sqlite' Warning in value[[3L]](cond) : pool_sqlite is not available > connection_info() NULL > > is_connected("simple_sqlite") NULL > is_connected("foo") NULL > DBI::dbDisconnect(live_connection("simple_sqlite")) Error: unable to find an inherited method for function ‘dbDisconnect’ for signature ‘conn = "NULL"’ Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [11s/11s] [11s/12s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(sqlhelper) > > test_check("sqlhelper") Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-connect-12.R Error whilst connecting sqlite_dbi: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'sqlite_dbi' Saving _problems/test-connect-17.R Saving _problems/test-connect-25.R Saving _problems/test-connect-49.R Saving _problems/test-get_driver-7.R Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-is_connected-6.R Saving _problems/test-is_connected-10.R Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-is_connected-23.R Saving _problems/test-is_connected-26.R Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-prepare_sql-7.R Saving _problems/test-prepare_sql-65.R Saving _problems/test-prepare_sql-94.R Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-prepare_sql-126.R Saving _problems/test-prepare_sql-211.R Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-set_default_conn_name-6.R Saving _problems/test-set_default_conn_name-14.R Error whilst connecting single_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem' Error whilst connecting single_mem2: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'single_mem2' Error whilst connecting pool_mem: Error in `get_driver()`: ! The package "RSQLite" is required to create connection 'pool_mem' Saving _problems/test-sqlrunners-9.R Saving _problems/test-sqlrunners-31.R Saving _problems/test-sqlrunners-45.R Saving _problems/test-sqlrunners-101.R Saving _problems/test-sqlrunners-130.R Saving _problems/test-sqlrunners-224.R Saving _problems/test-sqlrunners-267.R [ FAIL 23 | WARN 28 | SKIP 4 | PASS 52 ] ══ Skipped tests (4) ═══════════════════════════════════════════════════════════ • On CRAN (2): 'test-read_configs.R:20:3', 'test-read_configs.R:28:3' • Requires local SQL Server instance (1): 'test-prepare_sql.R:156:3' • {spData} is not installed. (1): 'test-sqlrunners.R:59:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-connect.R:11:3'): connections can be added and discovered ──── Expected `connection_info()$name` to equal `c("single_mem2", "single_mem", "pool_mem")`. Differences: `actual` is NULL `expected` is a character vector ('single_mem2', 'single_mem', 'pool_mem') ── Failure ('test-connect.R:17:3'): connections can be added and discovered ──── Expected `"sqlite_dbi" %in% connection_info()$name` to be TRUE. Differences: `actual`: FALSE `expected`: TRUE ── Error ('test-connect.R:25:3'): live_connection returns invisible nulls as expected ── Error: unable to find an inherited method for function 'dbDisconnect' for signature 'conn = "NULL"' Backtrace: ▆ 1. └─DBI::dbDisconnect(live_connection("sqlite_dbi")) at test-connect.R:25:3 2. └─methods (local) ``(``, ``, ``) ── Failure ('test-connect.R:48:3'): connections can be closed ────────────────── Expected `connection_info()$name` to equal `c("single_mem2", "single_mem", "pool_mem", "sqlite_dbi")`. Differences: `actual` is NULL `expected` is a character vector ('single_mem2', 'single_mem', 'pool_mem', 'sqlite_dbi') ── Error ('test-get_driver.R:7:3'): get_driver recognizes db types ───────────── Error in `get_driver("testcon", "odbc")`: The package "odbc" is required to create connection 'testcon' Backtrace: ▆ 1. └─sqlhelper:::get_driver("testcon", "odbc") at test-get_driver.R:7:3 2. └─rlang::check_installed(pn, reason = glue::glue("to create connection '{conn_name}'")) ── Failure ('test-is_connected.R:6:3'): is_connected returns an appropriate value ── Expected `is_connected("single_mem")` to be TRUE. Differences: `actual` is NULL `expected` is a logical vector (TRUE) ── Error ('test-is_connected.R:8:3'): is_connected returns an appropriate value ── Error: unable to find an inherited method for function 'dbDisconnect' for signature 'conn = "NULL"' Backtrace: ▆ 1. └─DBI::dbDisconnect(live_connection("single_mem")) at test-is_connected.R:8:3 2. └─methods (local) ``(``, ``, ``) ── Failure ('test-is_connected.R:23:3'): not_connected returns an appropriate value ── Expected `not_connected("single_mem")` to be FALSE. Differences: `actual` is NULL `expected` is a logical vector (FALSE) ── Error ('test-is_connected.R:24:3'): not_connected returns an appropriate value ── Error: unable to find an inherited method for function 'dbDisconnect' for signature 'conn = "NULL"' Backtrace: ▆ 1. └─DBI::dbDisconnect(live_connection("single_mem")) at test-is_connected.R:24:3 2. └─methods (local) ``(``, ``, ``) ── Error ('test-prepare_sql.R:7:3'): names are preserved ─────────────────────── Error in `value[[3L]](cond)`: default.conn is not a valid connection Backtrace: ▆ 1. └─sqlhelper::prepare_sql(c(one = "SELECT 1", two = "SELECT2")) at test-prepare_sql.R:7:3 2. └─base::tryCatch(...) 3. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 4. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) ── Error ('test-prepare_sql.R:45:3'): inputs are validated ───────────────────── Error in `value[[3L]](cond)`: default.conn is not a valid connection Backtrace: ▆ 1. ├─testthat::expect_identical(...) at test-prepare_sql.R:45:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─sqlhelper::prepare_sql(...) 5. └─base::tryCatch(...) 6. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 7. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. └─value[[3L]](cond) ── Error ('test-prepare_sql.R:93:3'): NAs are replaced by defaults ───────────── Error in `value[[3L]](cond)`: default.conn is not a valid connection Backtrace: ▆ 1. └─sqlhelper::prepare_sql(...) at test-prepare_sql.R:93:3 2. └─base::tryCatch(...) 3. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 4. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) ── Error ('test-prepare_sql.R:126:3'): defaults are properly set ─────────────── Error in `value[[3L]](cond)`: default.conn is not a valid connection Backtrace: ▆ 1. └─sqlhelper::prepare_sql(c(one = "select 1")) at test-prepare_sql.R:126:3 2. └─base::tryCatch(...) 3. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 4. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) ── Error ('test-prepare_sql.R:211:3'): interpolation is correct ──────────────── Error in `value[[3L]](cond)`: default.conn is not a valid connection Backtrace: ▆ 1. └─sqlhelper::prepare_sql(c(one = "select {x}")) at test-prepare_sql.R:211:3 2. └─base::tryCatch(...) 3. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 4. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) ── Failure ('test-set_default_conn_name.R:6:3'): get returns the default default ── Expected `get_default_conn_name()` to equal "single_mem". Differences: `actual` is NULL `expected` is a character vector ('single_mem') ── Error ('test-set_default_conn_name.R:14:3'): set changes the default connection ── Error in `set_default_conn_name("pool_mem")`: No connection named pool_mem Backtrace: ▆ 1. └─sqlhelper::set_default_conn_name("pool_mem") at test-set_default_conn_name.R:14:3 ── Error ('test-sqlrunners.R:7:3'): runqueries runs queries in sequence ──────── Error: unable to find an inherited method for function 'dbWriteTable' for signature 'conn = "NULL", name = "SQL"' Backtrace: ▆ 1. └─DBI::dbWriteTable(default_conn(), DBI::SQL("iris"), iris) at test-sqlrunners.R:7:3 2. └─methods (local) ``(``, ``, ``) ── Error ('test-sqlrunners.R:24:3'): runfiles runs files ─────────────────────── Error in `(function (sql, ..., default.conn = default_conn(), include_params = FALSE) { if (is.null(default.conn) & is.null(connection_info())) { connect() default.conn = default_conn() } if (!(methods::is(default.conn, "DBIConnection") | methods::is(default.conn, "Pool"))) { if (is.null(connection_info())) stop("No connections are configured") if (!is.character(default.conn)) stop("default.conn must be a connection or the name of a connection") if (default.conn %in% names(connection_cache)) default.conn <- live_connection(conn_name = default.conn) if (!(methods::is(default.conn, "DBIConnection") | methods::is(default.conn, "Pool"))) stop(glue::glue("default_conn is not a connection or the name of a connection")) } args <- list(...) args$sql <- sql args$default.conn <- default.conn if (!("values" %in% names(args))) { args$values <- parent.frame() } prepped_sql <- do.call(prepare_sql, args) reqd_cols <- c("execmethod", "conn_name", "geometry", "prepared_sql") prepped_sql$result <- purrr::pmap(prepped_sql[, reqd_cols], function(execmethod, conn_name, geometry, prepared_sql, default.conn) { if (execmethod == "get") dispatcher <- DBI::dbGetQuery else if (execmethod == "execute") dispatcher <- DBI::dbExecute else if (execmethod == "sendq") dispatcher <- DBI::dbSendQuery else if (execmethod == "sends") dispatcher <- DBI::dbSendStatement else if (execmethod == "spatial") dispatcher <- sf::st_read else stop(glue::glue("execmethod must be one of 'get', 'execute', 'sendq', 'sends' or 'spatial', not {execmethod}")) if (conn_name == "default") conn <- default.conn else conn <- live_connection(conn_name) if (execmethod == "spatial" && !is.na(geometry)) { result <- dispatcher(dsn = conn, query = prepared_sql, geometry_column = geometry) } else if (execmethod == "spatial") { result <- dispatcher(dsn = conn, query = prepared_sql) } else { result <- dispatcher(conn = conn, statement = prepared_sql) } }, default.conn = default.conn) execd_sql <- tibble::as_tibble(prepped_sql) if (include_params) { out <- execd_sql } else { out <- execd_sql$result names(out) <- execd_sql$qname } if (length(out) == 1 && is.na(names(out))) out <- out[[1]] out })(sql = structure(list(qname = c("two", "three"), quotesql = c(NA_character_, NA_character_), interpolate = c(NA_character_, NA_character_), execmethod = c(NA_character_, NA_character_), geometry = c(NA_character_, NA_character_), conn_name = c(NA_character_, NA_character_), sql = c("SELECT * FROM iris2", "SELECT * FROM iris3"), filename = c("test_runfiles", "test_runfiles2")), row.names = c(NA, -2L), class = c("tbl_df", "tbl", "data.frame")), include_params = FALSE, values = )`: No connections are configured Backtrace: ▆ 1. └─sqlhelper::runfiles(...) at test-sqlrunners.R:24:3 2. ├─base::do.call(runqueries, args) 3. └─sqlhelper (local) ``(sql = ``, include_params = FALSE, values = ``) ── Error ('test-sqlrunners.R:44:3'): quotesql works ──────────────────────────── Error in `runqueries(c(injection = "SELECT * FROM IRIS WHERE species LIKE {species}", survived = "SELECT * FROM SQLITE_SCHEMA WHERE type='table' AND name='iris'"))`: No connections are configured Backtrace: ▆ 1. └─sqlhelper::runqueries(...) at test-sqlrunners.R:44:3 ── Error ('test-sqlrunners.R:100:5'): send-bind-fetch works ──────────────────── Error in `runqueries("select * from iris where `Petal.Width` < ?", execmethod = "sends")`: No connections are configured Backtrace: ▆ 1. └─sqlhelper::runqueries(...) at test-sqlrunners.R:100:5 ── Error ('test-sqlrunners.R:130:3'): correct connections are used ───────────── Error in `runqueries("DROP TABLE iris", execmethod = "execute")`: No connections are configured Backtrace: ▆ 1. └─sqlhelper::runqueries("DROP TABLE iris", execmethod = "execute") at test-sqlrunners.R:130:3 ── Error ('test-sqlrunners.R:224:3'): interpolation can be turned off ────────── Error in `runqueries("select {n} as 'n'")`: No connections are configured Backtrace: ▆ 1. ├─testthat::expect_equal(runqueries("select {n} as 'n'"), data.frame(n)) at test-sqlrunners.R:224:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─sqlhelper::runqueries("select {n} as 'n'") ── Error ('test-sqlrunners.R:256:3'): parameters can be included when required ── Error in `runqueries("select 1 as 'n'", include_params = TRUE)`: No connections are configured Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-sqlrunners.R:256:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─sqlhelper::runqueries("select 1 as 'n'", include_params = TRUE) [ FAIL 23 | WARN 28 | SKIP 4 | PASS 52 ] Error: ! Test failures. Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * checking HTML version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs See ‘/data/gannet/ripley/R/packages/tests-Suggests/sqlhelper.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:10.98, 59.81 + 9.12